Sapphire - Imagine a framework
Sapphire - Imagine a framework

sapphire-support

Root Question Message

Fiery
Fiery1/21/2023
Looking for a example of i18n plugin's applyLocalizedBuilder

Hi! I'm adding localization support to my bot using the i18n plugin, and I'm not too sure how to use applyLocalizedBuilder. I'd be extremely grateful if anyone has a example of using it with a command that has options.
kaname-png
kaname-png1/21/2023
public override registerApplicationCommands(registry: Command.Registry) {
    registry.registerChatInputCommand((builder) =>
     applyLocalizedBuilder(builder, "key.translation.command")
        .setName(this.name)
        .setDescription(this.description)
    );
  }
kaname-png
kaname-png1/21/2023
Done
kaname-png
kaname-png1/21/2023
If you hover your mouse over the function, you'll see the documented examples
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy