how to Distinguish Between chosen_inline_result and message
Here is code snippet,
bot.on('chosen_inline_result', function(msg){ console.log("chosen_inline_result\n"+JSON.stringify(msg)+"\n result chosed\n"); });
bot.on('message', function (msg) { console.log("message \n"+JSON.stringify(msg)+"\n result chosed\n"); }
I have enabled inline mode
The problem is when user is querying inline by typing @bot
how could query part get into message part is it kind of bug or there is some solution for the same. If so Please Let me Know Thanking you in Advance
You can distinguish them by the event name, chosen_inline_result or message
thats my doubt as we can get it in the both event, i am using message event to get only text message and inline_result to get message from inline_clicks. so i want to distinguish it
You should be using text, instead of message to receive text messages! message event is fired for ALL types of updates!