def on_callback_query(self, msg):
query_id, self.request_chat_id, query_data = telepot.glance(msg, flavor='callback_query')
self.mongo.chat_id = self.request_chat_id
self.store_contacts(msg)
self.known_user = self.is_user_known()
self.__debug_print('>')
self.__debug_print('> callback')
self.__debug_print(msg)
to_send_msg, keyboard = self.process_command(query_data)
if to_send_msg is None:
await self._editor.editMessageReplyMarkup(reply_markup=keyboard)
self.waiting_for_menu_action = True
else:
await self._cancel_last()
sent = await self.sender.sendMessage(to_send_msg, reply_markup=keyboard, parse_mode='Markdown')
self._editor = telepot.aio.helper.Editor(self.bot, sent)
self._edit_msg_ident = telepot.message_identifier(sent)
self.waiting_for_menu_action = False
评论列表
文章目录