BotCommand class abstract

This object represents a bot command.

Available extensions
Annotations
  • @freezed

Constructors

BotCommand({@JsonKey.new(name: 'command') required String command, @JsonKey.new(name: 'description') required String description, @JsonKey.new(name: 'is_ephemeral') bool? isEphemeral})
Constructs a BotCommand object.
const
factory
BotCommand.fromJson(Map<String, dynamic> json)
Creates a BotCommand object from JSON object.
factory

Properties

command String
Text of the command, 1-32 characters. Can contain only lowercase English letters, digits and underscores.
no setterinherited
copyWith → $BotCommandCopyWith<BotCommand>
Create a copy of BotCommand with the given fields replaced by the non-null parameter values.
no setterinherited
description String
Description of the command, 3-256 characters.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isEphemeral bool?
Optional. True, if the command sends an ephemeral message, which can be seen only by the sender of the message and the bot
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_BotCommand value)) → TResult

Available on BotCommand, provided by the BotCommandPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_BotCommand value)?) → TResult?

Available on BotCommand, provided by the BotCommandPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_BotCommand value)?, {required TResult orElse()}) → TResult

Available on BotCommand, provided by the BotCommandPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this BotCommand to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited