Код: Выделить всё
@bot.on(events.NewMessage(incoming=True, pattern='Hi'))
async def main(event):
global SENDER
MSG = event.raw_text
SENDER=event.chat_id
async with bot.conversation(SENDER) as conv:
await conv.send_message('choose', buttons=[[Button.inline('Yes'), Button.inline('No')] ])
await conv.send_message(' Want More ? [/b]', parse_mode='html', buttons=[ [Button.text('Yes', resize=True,single_use=True), Button.text('No', resize=True,single_use=True)], [Button.text('More', resize=True,single_use=True)] ] )
...
...
В документации телемарафона предусмотрены методы cancel() и cancel_all(). Но как я могу реализовать их так, чтобы при получении сообщения до свидания разговор заканчивался?
Подробнее здесь: https://stackoverflow.com/questions/613 ... ic-message
Мобильная версия