Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @bot.event
- async def on_command_error(ctx, error):
- print(error)
- if isinstance(error, commands.UserInputError):
- await ctx.send(f"Correct use of the command: `{ctx.prefix}{ctx.command.name}` ({ctx.command.brief}): {ctx.prefix}{ctx.command.usage}")
- elif isinstance(error, commands.CommandNotFound):
- await ctx.send("Command was not found... Try again.")
- elif isinstance(error, commands.MissingPermissions):
- await ctx.send("You are not enough a rights")
- elif isinstance(error, commands.MissingRequiredArgument):
- await ctx.send("You didn't specify the argument")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement