From 47d7982953e4ae900c7041dd099fe3787f7d8cbe Mon Sep 17 00:00:00 2001 From: Anonymous Indian <73958752+anonyindian@users.noreply.github.com> Date: Mon, 22 Mar 2021 01:32:48 +0530 Subject: [PATCH] FedBan Bug Fix :) Previously on using /fban for first time, bot reply with "Fedban Reason Updated" and on 2nd time it reply "New FedBan" So, Reverted The Strings in accordance with fban SQL --- cinderella/modules/feds.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cinderella/modules/feds.py b/cinderella/modules/feds.py index a767c10b..b575de02 100644 --- a/cinderella/modules/feds.py +++ b/cinderella/modules/feds.py @@ -515,7 +515,7 @@ def fed_ban(bot: Bot, update: Update, args: List[str]): fed_chats = sql.all_fed_chats(fed_id) # Will send to current chat - bot.send_message(chat.id, "New FederationBan" \ + bot.send_message(chat.id, "FedBan reason updated" \ "\nFederation: {}" \ "\nFederation Admin: {}" \ "\nUser: {}" \ @@ -618,7 +618,7 @@ def fed_ban(bot: Bot, update: Update, args: List[str]): fed_chats = sql.all_fed_chats(fed_id) # Will send to current chat - bot.send_message(chat.id, "FedBan reason updated" \ + bot.send_message(chat.id, "New Fedban" \ "\nFederation: {}" \ "\nFederation Admin: {}" \ "\nUser: {}" \ @@ -626,7 +626,7 @@ def fed_ban(bot: Bot, update: Update, args: List[str]): "\nReason: {}".format(fed_name, mention_html(user.id, user.first_name), user_target, fban_user_id, reason), parse_mode="HTML") # Send message to owner if fednotif is enabled if getfednotif: - bot.send_message(info['owner'], "FedBan reason updated" \ + bot.send_message(info['owner'], "New Fedban" \ "\nFederation: {}" \ "\nFederation Admin: {}" \ "\nUser: {}" \ @@ -636,7 +636,7 @@ def fed_ban(bot: Bot, update: Update, args: List[str]): get_fedlog = sql.get_fed_log(fed_id) if get_fedlog: if int(get_fedlog) != int(chat.id): - bot.send_message(get_fedlog, "FedBan reason updated" \ + bot.send_message(get_fedlog, "New Fedban" \ "\nFederation: {}" \ "\nFederation Admin: {}" \ "\nUser: {}" \