From 9d7563a24d952b7e70c61eac5c70d75e14f8e1d4 Mon Sep 17 00:00:00 2001 From: Skycloudd <51929172+Skycloudd@users.noreply.github.com> Date: Tue, 30 Aug 2022 21:00:54 +0200 Subject: update to discord.py==2.0.1 (#66) --- cogs/errorhandler.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'cogs/errorhandler.py') diff --git a/cogs/errorhandler.py b/cogs/errorhandler.py index d428d72..0b61e7d 100644 --- a/cogs/errorhandler.py +++ b/cogs/errorhandler.py @@ -56,13 +56,6 @@ class Errorhandler(commands.Cog): f"{ctx.author.mention}, you have to wait {round(error.retry_after, 2)} seconds before using this again" ) - # For this error example we check to see where it came from... - elif isinstance(error, commands.BadArgument): - if ( - ctx.command.qualified_name == "tag list" - ): # Check if the command being invoked is 'tag list' - await ctx.send("I could not find that member. Please try again.") - else: # All other Errors not returned come here. And we can just print the default TraceBack. print( @@ -73,5 +66,5 @@ class Errorhandler(commands.Cog): ) -def setup(bot): - bot.add_cog(Errorhandler(bot)) +async def setup(bot): + await bot.add_cog(Errorhandler(bot)) -- cgit v1.2.3