#Forbidden 403 when registering slash commands

1 messages · Page 1 of 1 (latest)

low plank
#

Okay so... I made a post previously about the same issue, and tried everything y'all suggested, but I couldn't fix it.
Quick context: I have two bots, one for prod and one for test, both are a member of my test server. The test bot can register ALL of its commands on that server, meanwhile prod bot can only register the ones not specific to the server (I added some code below to help explain this).

@commands.slash_command(name = 'adminpanel', description = '[...]')
# This command is successfully registered on my test server, and users can access it

@commands.slash_command(name = 'login', description = '[...]', guild_ids = [TEST_SERVER_GUILD_ID])
# This command throws 403 Forbidden when trying to register.

I tried:

  • Checking the guild id specified - Yes, it's the correct ID.
  • Giving ALL permissions to the bot (also setting intents to discord.Intents.all() with gateway intents enabled).
  • Kicking and re-inviting the bot with "bot" and "application.commands" scopes (twice).
  • Starting up the bot on my Windows laptop instead of the Linux server it usually runs on (so not an enviroment issue)
  • Kicking test bot and only starting up prod bot.
    Neither of the above worked out, I still get 403 Forbidden but only for the commands specific to the test server. I use py-cord 2.4.1* and Python 3.9.13.
    Any ideas of what is possibly wrong? I appreciate any help 🙏
shut jacinth
merry fiber
#

Update to the version 2.4.1

shut jacinth
#

Also, kudos for the well formatted and information rich description

low plank
#

Thanks! I'll try updating

low plank
#

Updated, it didn't fix the issue tho

toxic wraith
low plank
#

Uuh nope, I never used debug guilds

shut jacinth
low plank
#

Yep, I copied it from Discord. It's not stored in a variable by default, I just replaced it in this snippet so it's obvious what it stands for

tough glen
#

and is the code identical between the two?

#

actually...

#

this isn't a sync issue... it's erroring when trying to fetch the existing guild commands? the only thing that can realistically be wrong is guild ID, or discord's done something with your bot

low plank
#

I tried switching the tokens and the test bot works. The code is also identical. And the guild id is also identical between the two bots. This is why I'm clueless