Answers for "discord.py command not found code"

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

discord.py commands not working

# If you are using the on_message() event, then make sure this code is run
# at the bottom of the event.

await bot.process_commands(message) # Allows commands to be run in the on_message() event
Posted by: Guest on June-24-2021

Python Answers by Framework

Browse Popular Code Answers by Language