fix delete callback
This commit is contained in:
parent
5ca35922fc
commit
3b03c65646
@ -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():
|
||||
|
Loading…
Reference in New Issue
Block a user