From 1c5ce6502f6a85f74fb14d18cee0a771541c8f28 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 8 Sep 2019 18:11:04 +0200 Subject: [PATCH] Use crabs for errors --- royalnet/bots/discord.py | 4 ++-- royalnet/bots/telegram.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/royalnet/bots/discord.py b/royalnet/bots/discord.py index 776109e4..7b67278c 100644 --- a/royalnet/bots/discord.py +++ b/royalnet/bots/discord.py @@ -126,10 +126,10 @@ class DiscordBot(GenericBot): f"Syntax: [c]/{command.name} {command.syntax}[/c]") except Exception as e: sentry_sdk.capture_exception(e) - error_message = f"{e.__class__.__name__}\n" + error_message = f"🦀 {e.__class__.__name__} 🦀\n" error_message += '\n'.join(e.args) log.error(f"Error in {command.name}: {error_message}") - await data.reply(f"⛔️ {error_message}") + await data.reply(f"{error_message}") if __debug__: raise diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index c7e636ee..62438433 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -178,7 +178,7 @@ class TelegramBot(GenericBot): f"Syntax: [c]/{command.name} {command.syntax}[/c]") except Exception as e: sentry_sdk.capture_exception(e) - error_message = f"⛔️ [b]{e.__class__.__name__}[/b]\n" + error_message = f"🦀 [b]{e.__class__.__name__}[/b] 🦀\n" error_message += '\n'.join(e.args) await data.reply(error_message) if __debug__: