Testing out the commands error
This commit is contained in:
parent
6f3f3dbf1b
commit
7de338c074
6
bot.py
6
bot.py
|
@ -51,9 +51,9 @@ async def on_member_remove(member):
|
|||
|
||||
@bot.event
|
||||
async def on_command_error(error, ctx):
|
||||
if isinstance(error, discord.CommandNotFound):
|
||||
fmt = "That is not a valid command! If you need asistance on what command to use, please type '!help'"
|
||||
await bot.send_message(ctx.message.channel, fmt)
|
||||
#if isinstance(error, discord.CommandNotFound):
|
||||
# fmt = "That is not a valid command! If you need asistance on what command to use, please type '!help'"
|
||||
# await bot.send_message(ctx.message.channel, fmt)
|
||||
fmt = 'An error occurred while processing this request: ```py\n{}: {}\n```'
|
||||
await bot.send_message(ctx.message.channel, fmt.format(type(error).__name__, error))
|
||||
|
||||
|
|
Loading…
Reference in a new issue