Answers for "on_command error discord.py"

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
0

how to limit a command to a role in discord.py

@bot.command()
@commands.has_role('RoleName')
async def command_name():
Posted by: Guest on June-24-2020

Python Answers by Framework

Browse Popular Code Answers by Language