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.
Solution:
If you hover your mouse over the function, you'll see the documented examples
Jump to solution
2 Replies
Sawako
Sawako3y ago
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
applyLocalizedBuilder(builder, "key.translation.command")
.setName(this.name)
.setDescription(this.description)
);
}
public override registerApplicationCommands(registry: Command.Registry) {
registry.registerChatInputCommand((builder) =>
applyLocalizedBuilder(builder, "key.translation.command")
.setName(this.name)
.setDescription(this.description)
);
}
Done
Solution
Sawako
Sawako3y ago
If you hover your mouse over the function, you'll see the documented examples

Did you find this page helpful?