Add BadUnionArgument to the bad argument catch
This commit is contained in:
parent
aeead4f5b2
commit
c671093a16
2
bot.py
2
bot.py
|
@ -82,7 +82,7 @@ async def on_command_error(ctx, error):
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if isinstance(error, commands.BadArgument):
|
if isinstance(error, (commands.BadArgument, commands.BadUnionArgument)):
|
||||||
fmt = "Please provide a valid argument to pass to the command: {}".format(error)
|
fmt = "Please provide a valid argument to pass to the command: {}".format(error)
|
||||||
await ctx.message.channel.send(fmt)
|
await ctx.message.channel.send(fmt)
|
||||||
elif isinstance(error, commands.NoPrivateMessage):
|
elif isinstance(error, commands.NoPrivateMessage):
|
||||||
|
|
Loading…
Reference in a new issue