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

Fix slash commands: Add support for description_localizations #1586

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Tutitoos
Copy link

This pull request adds support for description_localizations when handling slash commands in the following methods:

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

Currently, these methods do not properly handle the description_localizations field, which is crucial for providing localized descriptions for slash commands. To resolve this, the following code snippet is added to each affected method:

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

This ensures that descriptionLocalizations is properly passed to the API, allowing for multilingual support in slash command descriptions.

Changes

  • Updated all relevant methods to handle the description_localizations field.
  • Improved the support for localized descriptions in slash commands.

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

Successfully merging this pull request may close these issues.

1 participant