From 12a4139e265a932ecd7caf7ed8151c5cdb08e3dd Mon Sep 17 00:00:00 2001 From: D0rs4n <41237606+D0rs4n@users.noreply.github.com> Date: Sun, 8 Aug 2021 18:34:28 +0200 Subject: Remove duplicated code, improve consitency in Wikipedia Cog, and error_handler --- bot/exts/evergreen/error_handler.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'bot/exts/evergreen/error_handler.py') 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: -- cgit v1.2.3