Error [ApplicationCommandPermissionsTokenMissing]: Editing application command permissions requires

await guild.commands.permissions.add({
command : '1277387223595089932',
permissions: [
{
id: '1277347927500652647',
type : 'ROLE',
permission: true,
}
]
})
await guild.commands.permissions.add({
command : '1277387223595089932',
permissions: [
{
id: '1277347927500652647',
type : 'ROLE',
permission: true,
}
]
})
When trying to use this code it says "Error [ApplicationCommandPermissionsTokenMissing]: Editing application command permissions requires an OAuth2 bearer token, but none was provided." Where do I put the bearer token in?
11 Replies
d.js toolkit
d.js toolkit•2mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Mark
Mark•2mo ago
Correct, only guild admins can set that unless they authorize the bot with ouath2
Stiefanek
Stiefanek•2mo ago
I don't want to make my bot public. And I am the guild admin.
Mark
Mark•2mo ago
Then you need to grant it access with oauth2 or set it yourself as the admin
Stiefanek
Stiefanek•2mo ago
It is an admin. It has admin permissions When first authorizing it I gave it admin
Mark
Mark•2mo ago
Permissions is not the same as oauth2 This is not something that discord exposes to the normal bot API, it explicitly says a user admin has to do it or grant the bot the access to do it via oauth2
Stiefanek
Stiefanek•2mo ago
I did the OAuth2 URL Generator to get it onto my server. How else am I supposed to do it? I picked bot and Administrator
Mark
Mark•2mo ago
I suggest you ask in ddevs in #useful-servers as d.js does not have support for oauth2
Stiefanek
Stiefanek•2mo ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Stiefanek
Stiefanek•2mo ago
They do..
Mark
Mark•2mo ago
Where is there any d.js code on that page That's like saying databases or pm2 are related to d.js because the guide has a page on how to use them
Want results from more Discord servers?
Add your server