Provide an error for invalid quotes
This commit is contained in:
parent
11ff68f7e7
commit
a612d4231b
7
bot.py
7
bot.py
|
@ -90,6 +90,13 @@ async def on_command_error(ctx, error):
|
||||||
await ctx.message.channel.send(fmt)
|
await ctx.message.channel.send(fmt)
|
||||||
elif isinstance(error, commands.MissingRequiredArgument):
|
elif isinstance(error, commands.MissingRequiredArgument):
|
||||||
await ctx.message.channel.send(error)
|
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:
|
else:
|
||||||
if isinstance(bot.error_channel, int):
|
if isinstance(bot.error_channel, int):
|
||||||
bot.error_channel = bot.get_channel(bot.error_channel)
|
bot.error_channel = bot.get_channel(bot.error_channel)
|
||||||
|
|
Loading…
Reference in a new issue