Skip to content
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: Unknown application command permissions #5621

Closed
JKLorenzo opened this issue May 13, 2021 · 3 comments
Closed

DiscordAPIError: Unknown application command permissions #5621

JKLorenzo opened this issue May 13, 2021 · 3 comments

Comments

@JKLorenzo
Copy link
Contributor

JKLorenzo commented May 13, 2021

Please describe the problem you are having in as much detail as possible:

ApplicationCommand.fetchPermissions() throws DiscordAPIError: Unknown application command permissions when the ApplicationCommand doesn't have its permissions set.

It is important to note that the ApplicationCommands mentioned here are guild-specific (not global).

Include a reproducible code sample here, if possible:

// When fetching permissions from the guild containing ApplicationCommands with and without permissions set
GuildApplicationCommandManager.fetchPermissions() // <--- 🟠 Returns an array of ApplicationCommandPermissions for those ApplicationCommands with permissions set.

// When ApplicationCommand has its permissions set
ApplicationCommand.fetchPermissions() // <-- 🟢 Returns an array of ApplicationCommandPermissions

// When ApplicationCommand doesn't have permissions
ApplicationCommand.fetchPermissions() // <-- 🔴 Throws DiscordAPIError: Unknown application command permissions

Further details:

  • discord.js version: master
  • Node.js version: v14.16.0
  • Operating system: Windows 10 19042.985
  • Priority this issue should have – please be realistic and elaborate if possible: medium
  • I have also tested the issue on latest master, commit hash: 73f4114
@monbrey
Copy link
Member

monbrey commented May 13, 2021

ApplicationCommands (global's) do not have permissions directly, and must be set per guild - this is due to be fixed in #5613

@JKLorenzo
Copy link
Contributor Author

ApplicationCommands (global's) do not have permissions - this is due to be fixed in a PR

Yes, this issue does not cover global ApplicationCommands as stated in the description:

It is important to note that the ApplicationCommands mentioned here are guild-specific (not global).

@JKLorenzo
Copy link
Contributor Author

I might have to close this as this seemed to be an API issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants