Skip to content

Commit

Permalink
Check for delete and restrict perm in blacklist
Browse files Browse the repository at this point in the history
Signed-off-by: Sayan Biswas <sayan@pokurt.me>
  • Loading branch information
Dank-del committed Nov 30, 2021
1 parent ade9e78 commit d60d5e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tg_bot/modules/blacklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def blacklist(update, context):
send_message(update.effective_message, text, parse_mode=ParseMode.HTML)

@kigcmd(command="addblacklist", pass_args=True)
@user_admin(AdminPerms.CAN_CHANGE_INFO)
@user_admin(AdminPerms.CAN_DELETE_MESSAGES)
@typing_action
def add_blacklist(update, context):
msg = update.effective_message
Expand Down Expand Up @@ -124,7 +124,7 @@ def add_blacklist(update, context):
)

@kigcmd(command="unblacklist", pass_args=True)
@user_admin(AdminPerms.CAN_CHANGE_INFO)
@user_admin(AdminPerms.CAN_DELETE_MESSAGES)
@typing_action
def unblacklist(update, context):
msg = update.effective_message
Expand Down Expand Up @@ -209,7 +209,7 @@ def unblacklist(update, context):

@kigcmd(command="blacklistmode", pass_args=True)
@loggable
@user_admin(AdminPerms.CAN_CHANGE_INFO)
@user_admin(AdminPerms.CAN_RESTRICT_MEMBERS)
@typing_action
def blacklist_mode(update, context): # sourcery no-metrics
chat = update.effective_chat
Expand Down

0 comments on commit d60d5e1

Please sign in to comment.