localizationsName property

Map<Locale, String>? localizationsName
final

The command names to be shown to the user in the Slash Command UI by specified locales. See the available locales for a list of available locales. The key is the locale and the value is the name of the command in that locale. Values follow the same constraints as name (^[\w-]{1,32}$).

An example:

final scb = SlashCommandBuilder(
  'hello',
  'Hello World!',
  [],
  localizationsName: {
    Locale.french: 'salut',
    Locale.german: 'hallo',
  },
  localizationsDescription: {
    Locale.french: 'Salut le monde !',
    Locale.german: 'Hallo Welt!',
  },
);

Implementation

final Map<Locale, String>? localizationsName;