localizedDescriptions property

  1. @override
Map<Locale, String>? localizedDescriptions
final

The localized descriptions of this entity.

The localized descriptions for the command.

ChatCommand test = ChatCommand(
 'hi',
 'A test command',
  (
    IChatContext context,
    @Description('This is a description', {Locale.german: 'Dies ist eine Beschreibung'})
        String foo,
  ) async {
    context.respond(MessageBuilder.content(foo));
  },
);

Will be displayed as This is a description in English, but Dies ist eine Beschreibung in German, like so:

Implementation

@override
final Map<Locale, String>? localizedDescriptions;