session.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:ifictionbot 作者: ykrivopalov 项目源码 文件源码
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, {}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号