aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/error_handler.py
diff options
context:
space:
mode:
authorGravatar D0rs4n <[email protected]>2021-08-08 18:34:28 +0200
committerGravatar D0rs4n <[email protected]>2021-08-08 18:34:28 +0200
commit12a4139e265a932ecd7caf7ed8151c5cdb08e3dd (patch)
treec1b494eeb03b9fad3c5c8d17383ed3571e6ada06 /bot/exts/evergreen/error_handler.py
parentImprove code consitency in Wikipedia Cog,Exceptions, and Error handler (diff)
Remove duplicated code, improve consitency in Wikipedia Cog, and error_handler
Diffstat (limited to 'bot/exts/evergreen/error_handler.py')
-rw-r--r--bot/exts/evergreen/error_handler.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/evergreen/error_handler.py
index 8fcbb8f2..7a916606 100644
--- a/bot/exts/evergreen/error_handler.py
+++ b/bot/exts/evergreen/error_handler.py
@@ -113,10 +113,7 @@ class CommandErrorHandler(commands.Cog):
return
if isinstance(error, commands.CheckFailure):
- await ctx.send(
- embed=self.error_embed(
- "You are not authorized to use this command.",
- NEGATIVE_REPLIES))
+ await ctx.send(embed=self.error_embed("You are not authorized to use this command.", NEGATIVE_REPLIES))
return
if isinstance(error, UserNotPlayingError):
@@ -127,7 +124,9 @@ class CommandErrorHandler(commands.Cog):
await ctx.send(
embed=self.error_embed(
f"There was an error when communicating with the {error.api}",
- NEGATIVE_REPLIES))
+ NEGATIVE_REPLIES
+ )
+ )
return
with push_scope() as scope: