From bf66c0c693e5a7b4f37fa77a6cc1f452d9fe934e Mon Sep 17 00:00:00 2001 From: madboy482 <73926361+madboy482@users.noreply.github.com> Date: Tue, 9 Mar 2021 17:29:02 +0530 Subject: [PATCH] Update global_bans.py --- SaitamaRobot/modules/global_bans.py | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/SaitamaRobot/modules/global_bans.py b/SaitamaRobot/modules/global_bans.py index 26564d1..17d46e5 100644 --- a/SaitamaRobot/modules/global_bans.py +++ b/SaitamaRobot/modules/global_bans.py @@ -154,17 +154,17 @@ def gban(update: Update, context: CallbackContext): log_message = ( f"#GBANNED\n" - f"Originated from: {chat_origin}\n" - f"Admin: {mention_html(user.id, user.first_name)}\n" - f"Banned User: {mention_html(user_chat.id, user_chat.first_name)}\n" - f"Banned User ID: {user_chat.id}\n" - f"Event Stamp: {current_time}") + f"➥ Originated from: {chat_origin}\n" + f"➥ Admin: {mention_html(user.id, user.first_name)}\n" + f"➥ Banned User: {mention_html(user_chat.id, user_chat.first_name)}\n" + f"➥ Banned User ID: {user_chat.id}\n" + f"➥ Event Stamp: {current_time}") if reason: if chat.type == chat.SUPERGROUP and chat.username: - log_message += f"\nReason: {reason}" + log_message += f"\n➥ Reason: {reason}" else: - log_message += f"\nReason: {reason}" + log_message += f"\n➥ Reason: {reason}" if EVENT_LOGS: try: @@ -237,8 +237,8 @@ def gban(update: Update, context: CallbackContext): bot.send_message( user_id, "#EVENT" "You have been marked as Malicious and as such have been banned from any future groups we manage." - f"\nReason: {html.escape(user.reason)}" - f"Appeal Chat: @{SUPPORT_CHAT}", + f"\n➥ Reason: {html.escape(user.reason)}" + f"➥ Appeal Chat: @{SUPPORT_CHAT}", parse_mode=ParseMode.HTML) except: pass # bot probably blocked by user @@ -284,11 +284,11 @@ def ungban(update: Update, context: CallbackContext): log_message = ( f"#UNGBANNED\n" - f"Originated from: {chat_origin}\n" - f"Admin: {mention_html(user.id, user.first_name)}\n" - f"Unbanned User: {mention_html(user_chat.id, user_chat.first_name)}\n" - f"Unbanned User ID: {user_chat.id}\n" - f"Event Stamp: {current_time}") + f"➥ Originated from: {chat_origin}\n" + f"➥ Admin: {mention_html(user.id, user.first_name)}\n" + f"➥ Unbanned User: {mention_html(user_chat.id, user_chat.first_name)}\n" + f"➥ Unbanned User ID: {user_chat.id}\n" + f"➥ Event Stamp: {current_time}") if EVENT_LOGS: try: @@ -392,10 +392,10 @@ def check_and_ban(update, user_id, should_message=True): if should_message: update.effective_message.reply_text( f"Alert: Acc. to my lists of g-banned users, this user is globally banned!!\n" - f"*Bans them from here...*.\n" - f"Appeal chat: {SPAMWATCH_SUPPORT_CHAT}\n" - f"User ID: {sw_ban.id}\n" - f"Ban Reason: {html.escape(sw_ban.reason)}", + f"*Bans them from here, without expiry date...*.\n" + f"➥ Appeal chat: {SPAMWATCH_SUPPORT_CHAT}\n" + f"➥ User ID: {sw_ban.id}\n" + f"➥ Ban Reason: {html.escape(sw_ban.reason)}", parse_mode=ParseMode.HTML) return @@ -403,9 +403,9 @@ def check_and_ban(update, user_id, should_message=True): update.effective_chat.kick_member(user_id) if should_message: text = f"Alert: Acc. to my lists of g-banned users, this user is globally banned!!\n" \ - f"*Bans them from here*.\n" \ - f"Appeal chat: @{SUPPORT_CHAT}\n" \ - f"User ID: {user_id}" + f"*Bans them from here, without expiry date...*.\n" \ + f"➥ Appeal chat: @{SUPPORT_CHAT}\n" \ + f"➥ User ID: {user_id}" user = sql.get_gbanned_user(user_id) if user.reason: text += f"\nBan Reason: {html.escape(user.reason)}" @@ -481,8 +481,8 @@ def __user_info__(user_id): text = text.format("Yes") user = sql.get_gbanned_user(user_id) if user.reason: - text += f"\nReason: {html.escape(user.reason)}" - text += f"\nAppeal Chat: @{SUPPORT_CHAT}" + text += f"\n➥ Reason: {html.escape(user.reason)}" + text += f"\n➥ Appeal Chat: @{SUPPORT_CHAT}" else: text = text.format("???") return text