Comments (9)
any news on this?
Would love to see that feature.
from hubot-telegram.
Yepp...on my to do list :) maybe today or tomorrow
On Tuesday, January 5, 2016, Aleksey Shirokih [email protected]
wrote:
according to latest api changes please add inline query support to your api
https://coretelegramorg/bots/inline
tnx!—
Reply to this email directly or view it on GitHub
#32.
from hubot-telegram.
Let me know if you need help on this @lukefx, might need to do some refactoring to support it with minimal code duplication.
from hubot-telegram.
@arcturial yepp thx, first of all, what do you think for the inlineQuery initial request? https://core.telegram.org/bots/api#inlinequery we should manage the request within the telegrambot api and launch and event to the adapter? What do you think?
from hubot-telegram.
All the telegrambot API does is interact with the getUpdate method and sends the result to the callback, so not sure it would be the best place to put the events. However, we can change the code at line 212 and 225 to call handleInlineQuery
if the inline_query
key is set and then abstracting all the "common tasks" into different methods.
from hubot-telegram.
All the telegrambot API does is interact with the getUpdate method and sends the result to the callback, so not sure it would be the best place to put the events. However, we can change the code at line 212 and 225 to call handleInlineQuery if the inline_query key is set and then abstracting all the "common tasks" into different methods.
I was thinking a method to let user define what the bot should reply to the inlinquery, so yes, quick and dirty could be in the handleUpdate method add an if and check if the message starts with a "@" and then? send an event so you can catch it in a script and compose your reply...
Anyway, let's create a branch...and collaborate on it...code speak itself 😄
from hubot-telegram.
the text will not starts with @
i had already seen it.
instead of it you will have the inline_query object with text in it
ср, 6 янв. 2016 г. в 16:45, Luca Simone [email protected]:
All the telegrambot API does is interact with the getUpdate method and
sends the result to the callback, so not sure it would be the best place to
put the events. However, we can change the code at line 212 and 225 to call
handleInlineQuery if the inline_query key is set and then abstracting all
the "common tasks" into different methods.I was thinking a method to let user define what the bot should reply to
the inlinquery, so yes, quick and dirty could be in the handleUpdate method
add an if and check if the message starts with a "@" and then? send an
event so you can catch it in a script and compose your reply...Anyway, let's create a branch...and collaborate on it...code speak itself [image:
😄]—
Reply to this email directly or view it on GitHub
#32 (comment)
.
from hubot-telegram.
Ah ok...so how do we know if is an inline query? By the object's attributes?
#33 I've created a branch for this...
from hubot-telegram.
Teap, the object attributes we get in getUpdates
are different. Like @freeseacher said, it will contain the inline_query
key with the text of the command inside inline_query.query
.
from hubot-telegram.
Related Issues (20)
- Receiving double messages when polling
- ERROR Error: HTTP status 504 returned. HOT 2
- ERROR TypeError: Cannot read property 'message_id' of undefined HOT 11
- bot no receiving messages from supergroup HOT 5
- API fields have been renamed HOT 2
- Remove bot name when using /command@bot_name HOT 1
- Maximum call stack size exceeded HOT 6
- Slow connectivity causes duplicate messages HOT 2
- Newbie request
- error on help command (and workaround) HOT 11
- Expose reply_to_message from message
- Add `hubot-adapter` topic HOT 1
- / commands in supergroups not working HOT 2
- Proxy issues HOT 1
- CoffeeScript 2.x support HOT 2
- Read the response text of a message HOT 1
- Group Chat Slash Command With Mention HOT 1
- Interval Issue HOT 1
- Markdown with Bad Entities
- Error seeking help HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubot-telegram.