diff --git a/bot.py b/bot.py index ecfbd13..81a2e9a 100644 --- a/bot.py +++ b/bot.py @@ -466,19 +466,22 @@ def error(update: Update, context: CallbackContext): ) tb_string = "".join(tb_list) print(tb_string) - if update: - message = ( - f"An exception was raised while handling an update\n" - f"
update = {html.escape(json.dumps(update.to_dict(), indent=2, ensure_ascii=False))}" - "\n\n" - f"
context.chat_data = {html.escape(str(context.chat_data))}\n\n" - f"
context.user_data = {html.escape(str(context.user_data))}\n\n" - f"
{html.escape(tb_string)}" - ) + # if update: + # message = ( + # f"An exception was raised while handling an update\n" + # f"
update = {html.escape(json.dumps(update.to_dict(), indent=2, ensure_ascii=False))}" + # "\n\n" + # f"
context.chat_data = {html.escape(str(context.chat_data))}\n\n" + # f"
context.user_data = {html.escape(str(context.user_data))}\n\n" + # f"
{html.escape(tb_string)}" + # ) + update.message.reply_text( + text="An error has occured. Please inform @MisterBiggs if the error persists." + ) - # Finally, send the message - # update.message.reply_text(text=message, parse_mode=telegram.ParseMode.HTML) - # update.message.reply_text(text="Please inform the bot admin of this issue.") + # Finally, send the message + # update.message.reply_text(text=message, parse_mode=telegram.ParseMode.HTML) + # update.message.reply_text(text="Please inform the bot admin of this issue.") def main():