diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index 65c586c..0b4e719 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -122,7 +122,8 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): i.send(bot) def handle_delete(self, update: Update, ctx: CallbackContext): - if update.effective_message.chat_id != self.chat_id: + if self.users.count() and not self.users.filter(user_id=update.effective_user.id).count(): + update.effective_message.reply_text('GTFO') return reply_to_id = update.effective_message.reply_to_message.message_id try: @@ -132,7 +133,8 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): update.effective_message.reply_text('Deleted') def handle_count(self, update: Update, ctx: CallbackContext): - if update.effective_message.chat_id != self.chat_id: + if self.users.count() and not self.users.filter(user_id=update.effective_user.id).count(): + update.effective_message.reply_text('GTFO') return update.effective_message.reply_text(f'{QueuedItem.objects.filter(config=self).count()} items queued')