def on_message(self, msg):
debug('MainDialog on_message')
content_type = telepot.glance(msg)[0]
if content_type != 'text':
return
text = msg['text']
if text == self._GAMES_DB:
return DIALOG_BROWSING, {}
elif text == self._RECENTLY_PLAYED:
return DIALOG_LAST_PLAYED, {}
elif text == self._HOWTO:
await self._sender.sendMessage(HELP_MESSAGE, parse_mode='Markdown')
else:
await self._sender.sendMessage('Choose section', reply_markup=self._KEYBOARD)
return DIALOG_MAIN, {}
评论列表
文章目录