#Rest.put erroring "Missing Access[50001]"

1 messages · Page 1 of 1 (latest)

desert pelican

So, I'm using Discord.js v14 and I stole some code from my other bot, but for some reason rest.put ain't working and I can't figure out why. My bot has one of the highest roles in the server i'm editing with administrator perms and all discord developer portal privileges . Here's my snippet of code:

(async () => {
    try {
      console.log('Started refreshing application (/) commands.');
  
      await rest.put(
        Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: commands },
      );

      await rest.put(
        Routes.applicationCommands(CLIENT_ID), { body: [] },
      );
  
      console.log('Successfully reloaded application (/) commands.');
    } catch (error) {
      console.error(error);
    }
})();