RichText.botCommand constructor

const RichText.botCommand({
  1. @JsonKey.new(name: 'type') @Default.new(RichTextType.botCommand) RichTextType type,
  2. @JsonKey.new(name: 'text') @RichTextConverter() required RichText text,
  3. @JsonKey.new(name: 'bot_command') required String botCommand,
})

A bot command.

Implementation

const factory RichText.botCommand({
  /// Type of the rich text, always "bot_command"
  @JsonKey(name: 'type') @Default(RichTextType.botCommand) RichTextType type,

  /// The text
  @JsonKey(name: 'text') @RichTextConverter() required RichText text,

  /// The bot command
  @JsonKey(name: 'bot_command') required String botCommand,
}) = RichTextBotCommand;