diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index 8cdec0c..53e208f 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -194,15 +194,15 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): update.effective_message.reply_text('Not found') def handle_delete_callback(self, update: Update, ctx: CallbackContext): - message_id = update.callback_query.message.message_id + message_id = update.effective_message.message_id try: msg = QueuedItem.objects.get(Q(message_id=message_id) | Q(message_ids_extra__contains=f'{message_id}'), config=self) msg.delete() - update.effective_message.edit_text('Deleted', reply_markup=None) update.callback_query.answer('Deleted') except QueuedItem.DoesNotExist: update.callback_query.answer('Not found') + update.effective_message.edit_caption('Deleted', reply_markup=None) def handle_count(self, update: Update, ctx: CallbackContext): if self.users.count() and not self.users.filter(user_id=update.effective_user.id).count():