client.application.commands.permissions.set(), 401: Unauthorized
When I try to use the
client.application.commands.permissions.set()
I get the 401: Unauthorized
You just use the bot token right? or do you have to use the application secret but i still get the error then. What am I doing wrong?10 Replies
- 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!Are the scopes the app has.
You should use a guild id and OAuth2 token of the guild admin
Well needing an Oauth token for this complicates stuff 😅
Well you can add
default_member_permissions
for commands, but if you need to add channel/member level permission override. Then you'll have to go through oauthI want to use role permissions
Yeah then without oauth2, you can't
:sadge:
It looks like it really needs to be the owners oauth? because I just try with my token and still got 401
and I am administrator on the guild
Server admins can manage permissions in Server settings > Integrations > The bot > Commands > Permissions
Not really just did it manually but would have been nice, because 80% don't understand how the command system works. The disabled all commands in the @everyone role. So nobody could use a single application 😅