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

Missing support for description_localizations in multiple methods when handling slash commands #1585

Open
Tutitoos opened this issue Jan 10, 2025 · 0 comments

Comments

@Tutitoos
Copy link

The description_localizations field, which allows providing localized descriptions for slash commands, is currently not supported in several methods of the Eris library. This causes issues when attempting to register or edit slash commands with localized descriptions, as the field is simply not passed to the API.

Affected Methods

The following methods are missing support for the description_localizations field:

  • createCommand
  • createGuildCommand
  • editCommand
  • editGuildCommand
  • bulkEditCommands
  • bulkEditGuildCommands

Proposed Solution

To fix this issue, the following code snippet needs to be added to each of the affected methods:

if (command.descriptionLocalizations !== undefined) {
    command.description_localizations = command.descriptionLocalizations;
}

This code ensures that the descriptionLocalizations property is properly mapped to the description_localizations field expected by the Discord API.

Impact

Adding this support will enable developers to register and edit slash commands with localized descriptions, improving the library's compliance with Discord's API and making it more useful for multilingual applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant