From ffc14b28970783dffdf504ddf7e89027665cd061 Mon Sep 17 00:00:00 2001 From: Myned Date: Tue, 22 Feb 2022 17:30:25 -0600 Subject: [PATCH] Fix error messages in DMs --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index c9eace0..111b456 100644 --- a/config.py +++ b/config.py @@ -27,6 +27,6 @@ def error(event): exception = event.exception.__cause__ or event.exception return ( - f"**`{event.context.command.name}` in {event.context.get_channel().mention}" + f"**`{event.context.command.name}` in {event.context.get_channel().mention if event.context.guild_id else 'DMs'}" f"```❗ {type(exception).__name__}: {exception}```**" )