fix channel helper commands
This commit is contained in:
parent
626cc2b990
commit
9c2928fa4e
@ -122,7 +122,8 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig):
|
|||||||
i.send(bot)
|
i.send(bot)
|
||||||
|
|
||||||
def handle_delete(self, update: Update, ctx: CallbackContext):
|
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
|
return
|
||||||
reply_to_id = update.effective_message.reply_to_message.message_id
|
reply_to_id = update.effective_message.reply_to_message.message_id
|
||||||
try:
|
try:
|
||||||
@ -132,7 +133,8 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig):
|
|||||||
update.effective_message.reply_text('Deleted')
|
update.effective_message.reply_text('Deleted')
|
||||||
|
|
||||||
def handle_count(self, update: Update, ctx: CallbackContext):
|
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
|
return
|
||||||
update.effective_message.reply_text(f'{QueuedItem.objects.filter(config=self).count()} items queued')
|
update.effective_message.reply_text(f'{QueuedItem.objects.filter(config=self).count()} items queued')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user