From a612d4231ba8d6bdae30df36b6fcc401855ba96c Mon Sep 17 00:00:00 2001 From: Dan Hess Date: Sat, 30 Nov 2019 15:24:17 -0600 Subject: [PATCH] Provide an error for invalid quotes --- bot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bot.py b/bot.py index c3639c6..2088f38 100644 --- a/bot.py +++ b/bot.py @@ -90,6 +90,13 @@ async def on_command_error(ctx, error): await ctx.message.channel.send(fmt) elif isinstance(error, commands.MissingRequiredArgument): await ctx.message.channel.send(error) + elif isinstance(error, ( + commands.InvalidEndOfQuotedStringError, + commands.ExpectedClosingQuoteError, + commands.UnexpectedQuoteError) + ): + await ctx.message.channel.send("Quotes must go around the arguments you want to provide to the command," + " recheck where your quotes are") else: if isinstance(bot.error_channel, int): bot.error_channel = bot.get_channel(bot.error_channel)