BotCommand constructor

const BotCommand({
  1. @JsonKey.new(name: 'command') required String command,
  2. @JsonKey.new(name: 'description') required String description,
  3. @JsonKey.new(name: 'is_ephemeral') bool? isEphemeral,
})

Constructs a BotCommand object.

Implementation

const factory BotCommand({
  /// Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.
  @JsonKey(name: 'command') required String command,

  /// Description of the command, 3-256 characters.
  @JsonKey(name: 'description') required String description,

  /// Optional. True, if the command sends an ephemeral message, which can be seen only by the sender of the message and the bot
  @JsonKey(name: 'is_ephemeral') bool? isEphemeral,
}) = _BotCommand;