benjick / meteor-telegram-bot

Telegram bot plugin for Meteor
24 stars 15 forks source link

End Conversation with command dispatch. #27

Open fckngold opened 8 years ago

fckngold commented 8 years ago

Hello everybody. I'm trying to handle the case when the user terminates the listener with another register command. For example, if I'm in progress of the command /new and send another command, such as /list. What I need to do is:

TelegramBot.endConversation(…);
TelegramBot.send('/list.', …);

The problem is when I endConversation, the .send command doesn't work. Yes, it sends a message /list, but it doesn't initiate TelegramBot.addListener('/list', …).

Could you suggest how to solve this?

shrmnk commented 8 years ago

Hey man, I got your email. I'll check on this case tomorrow when I can finally get my computer working (been working off my phone because of a failed SSD).

Just to clarify - you had previously set up a listener on /list and then started a conversation? And now, you want it such that a specific command (/new) would end the conversation and revert back to the listener's handler?