From 9320b1fc88e9515db628da0e0225989ed57f8430 Mon Sep 17 00:00:00 2001 From: Nikolaj Danger Date: Thu, 4 Feb 2021 13:43:53 +0100 Subject: [PATCH] :goal_net: Added an error message --- Gwendolyn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gwendolyn.py b/Gwendolyn.py index a8b671b..96c03d2 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -78,8 +78,11 @@ async def on_command(ctx): async def on_command_error(ctx, error): if isinstance(error, commands.CommandNotFound): await ctx.send("That's not a command (error code 001)") + elif isinstance(error,commands.errors.MissingRequiredArgument): + logThis(f"{error}",str(ctx.message.channel.id)) + await ctx.send("Missing command parameters (error code 002). Try using `!help [command]` to find out how to use the command.") else: - logThis(f"Something went wrong, {error}",str(ctx.message.channel.id)) + logThis(f"Something went wrong, {error}, ({type(error)})",str(ctx.message.channel.id)) await ctx.send("Something went wrong (error code 000)") #Loads cogs