[ANSWERED] discord.app_commands.errors.MissingApplicationID Error #9517
-
ExplanationI had made a bot just to have fun with my friends, and at first it would just detect whenever someone posted a message and replied, and it worked perfectly, but I wanted to add slash commands so of course I researched how to do it. And I'm pretty sure my code was right at that point, but I kept getting the discord.app_commands.errors.MissingApplicationID error whenever I tried to run the code. The codeThe full traceback: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hello, your issue stems from you defining both a The error specifically occurs because the internal |
Beta Was this translation helpful? Give feedback.
Hello, your issue stems from you defining both a
ClientandBotinstance and mixing them up afterwards. TheBotclass is an extension of theClientclass, and if you'd like to switch from one to the other to make use of additional functionality in Bot you should replace the Client with a Bot, rather than creating it in addition to the other.The error specifically occurs because the internal
application_idfield is filled when the library connects to Discord, and you're syncing the bot'sCommandTreewithin the ready event for theclient, rather than the one for yourbot. If you only have one of the two as described above your issue should resolve itself 🙂 Do note that the only proper way …