Search code examples
pythondiscordpycord

My discord bot reached the app command limit. How to fix this?


My discord bot has reached the limit for app commands for the day. I have about 5 commands, but still it reached the limit. Is this because I call the sync function every time I restart my bot while developing? If I cannot simply restart my bot while developing without discord just denying my new commands development is nearly impossible. I am using pycord by the way. Anyone who can explain to me how this works and what I can do to make sure I don't run into this problem again in the future?


Solution

  • That's create commands. You only need to create each command once, not once per bot run. Discord associates the commands with your bot's unique ID.

    You can do one of two things.

    1. Dynamically check, in your code, if the command exists and has the right properties. If so, do not re-create it.
    2. Have a separate Python module that creates the command. This module is not run as part of your normal bot and is a separate program that you run independently whenever you add a new command.