Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Commit

Permalink
PR PaulSonOfLars#33 from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe committed Nov 1, 2018
1 parent 46cc635 commit a9e9009
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tg_bot/modules/warns.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def warn(user: User, chat: Chat, reason: str, message: Message, warner: User = N


@run_async
@user_admin_no_reply
#@user_admin_no_reply
@bot_admin
@loggable
def button(bot: Bot, update: Update) -> str:
Expand All @@ -103,6 +103,9 @@ def button(bot: Bot, update: Update) -> str:
if match:
user_id = match.group(1)
chat = update.effective_chat # type: Optional[Chat]
if not is_user_admin(chat, int(user.id)):
query.answer(text="ചീള് പിള്ളേർസ് ADMIN അല്ല എന്നിട്ട് REMOVE WARN അമർത്താൻ വന്നിരിക്കുന്നു", show_alert=True)
return ""
res = sql.remove_warn(user_id, chat.id)
if res:
update.effective_message.edit_text(
Expand Down

0 comments on commit a9e9009

Please sign in to comment.