1
0
Fork 0
mirror of synced 2024-05-06 21:52:30 +12:00

Provide an error for invalid quotes

This commit is contained in:
Dan Hess 2019-11-30 15:24:17 -06:00
parent 11ff68f7e7
commit a612d4231b

7
bot.py
View file

@ -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)