New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DiscordAPIError: Bots cannot use this endpoint #766
Comments
Hi! I cant reproduce your issue. What version discord.js do you have installed?(Check in node_modules folder) |
Hey! In |
My URLCommand file looks like this: import { Command } from '@discord-nestjs/core';
import { URLCreateCommand } from './subcommand/create/create.command';
import { URLDeleteCommand } from './subcommand/delete/delete.command';
import { URLGetCommand } from './subcommand/get/get.command';
@Command({
name: 'url',
description: 'Manage all shortened URLs with this command',
include: [URLCreateCommand, URLDeleteCommand, URLGetCommand],
defaultPermission: false
})
export class URLCommand {} |
13.8.0 latest |
Update to latest, please |
@TheFlash787 hi |
Unfortunately I'm not too sure what you mean here. slashCommandsPermissions is a Discord NestJS implementation, not DiscordJS.
Huge apologies for the delay! I have updated to DiscordJS 13.8, and also made sure my Discord NestJS versions were up to date however I'm still experiencing this issue. I have replicated this using your command sample. It looks like, simply adding If you do the same, do you run into this issue? @fjodor-rybakov |
The issue must be caused here, surely, as it hasn't been updated to match the new Discord integration permission system they released a month or so ago:
|
Can you make pull request? |
Unfortunately I'm not too confident that I can commit time to this, but if I can, I will for sure take a look. Nonetheless, if you have anything down the line you would like my help testing, please don't hesitate to let me know. |
@fjodor-rybakov Since this error is still occuring and easily replicatable with |
Alright, so this will be fairly easy to accomplish once this is complete -- we may just need to rework how the permissions are handled a little, but the tools should be there: discordjs/discord.js#8162 We would basically need to change |
Hi! Can you check your issue in the new version? |
I will migrate to v14 and let you know 🙂 |
@fjodor-rybakov After updating, it looks like this still occurs -- but with a different error. Do you know why this might be? It continues only to occur when slashCommandPermissions is populated. slashCommandsPermissions: [
{
commandClassType: MyCommand,
permissions: [
{
id: '000-my-role-id',
type: ApplicationCommandPermissionType.Role,
permission: true
}
]
}
] |
Since you can no longer set permissions through the bot, I removed the misleading functionality |
Describe the bug
I've updated my Discord NestJS to version (3.3.4) but unfortunately I'm still running into issues with registering Discord slash commands with permissions.
To Reproduce
My configuration is as follows (I have removed all commands that were not required to produce the error, it looks like any command triggers it):
Expected behavior
Prior to the DiscordAPI command changes, this configuration worked as expected and commands were protected by the needed permissions.
The text was updated successfully, but these errors were encountered: