Answers for "discordpy handle command error"

1

discord.py on command error

@client.event() #Replace 'client' with whatever neccesary
async def on_command_error(ctx, error):
  if isinstance(error, commands.MissingRequiredArguments):
    # Replace MissingRequiredArguments with your error
    ctx.send("Please pass all required arguments")
Posted by: Guest on April-07-2021
-1

discordpy error handling

CHECK OUT 'https://realpython.com/lessons/handling-exceptions/'
Posted by: Guest on April-28-2021

Python Answers by Framework

Browse Popular Code Answers by Language