Register Commands No Longer Working Due to Permission Changes
0xzoz opened this issue · 2 comments
0xzoz commented
Using yarn run commands:register
returns a Discord API Error.
[2022-09-02 19:02:21.228] ERROR: An error occurred while running a command action.
err: {
"type": "DiscordAPIError",
"message": "Bots cannot use this endpoint",
"stack":
DiscordAPIError[20001]: Bots cannot use this endpoint
at SequentialHandler.runRequest (/Users/thepassivetrust/Desktop/Web3SocialCapital/Tally/tallyho-bot/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:287:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at SequentialHandler.queueRequest (/Users/thepassivetrust/Desktop/Web3SocialCapital/Tally/tallyho-bot/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:99:14)
at REST.request (/Users/thepassivetrust/Desktop/Web3SocialCapital/Tally/tallyho-bot/node_modules/@discordjs/rest/src/lib/REST.ts:50:22)
at CommandRegistrationService.process (/Users/thepassivetrust/Desktop/Web3SocialCapital/Tally/tallyho-bot/src/services/command-registration-service.ts:24:27)
at start (/Users/thepassivetrust/Desktop/Web3SocialCapital/Tally/tallyho-bot/src/start-bot.ts:104:13)
"rawError": {
"message": "Bots cannot use this endpoint",
"code": 20001
},
"code": 20001,
"status": 403,
"method": "GET",
"url": "https://discord.com/api/v10/applications/tallyho--bot#8186/commands",
"requestBody": {}
}
This is due to changes in the Permissions V2 on (April 27, 2022). A related article can be found here
KevinNovak commented
Can you narrow down which command is causing the issue and post the metadata here?
Are you using default_permission
in the metadata by chance? This was deprecated and replaced with default_member_permissions
.
KevinNovak commented
Closing this. If you're still experiencing the issue please respond here / open a new issue.