예제 #1
0
    def process_callback(self, callback: CallbackQuery) -> None:
        records = self.collector.get_removal_queue(callback.chat_id)
        page = callback.data.get("page")
        table = Table(records, cast(int, page))

        self.client.edit_message_text(
            callback.chat_id,
            callback.message_id,
            table.build(),
            parse_mode="HTML",
            **table.get_reply_markup(),
        )

        self.client.answer_callback_query(callback.id)
예제 #2
0
 def process(self, message: Message) -> None:
     records = self.collector.get_removal_queue(message.chat.id)
     table = Table(records, 1)
     self.client.reply(message, table.build(), **table.get_reply_markup())