BotCommandScope class sealed
This object represents the scope to which bot commands are applied.
- Annotations
-
- @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
Constructors
- BotCommandScope.allChatAdministrators({@Default(BotCommandScopeType.allChatAdministrators) @JsonKey(name: 'type') BotCommandScopeType type})
-
Represents the scope of bot commands, covering all group and supergroup chat administrators.
constfactory
- BotCommandScope.allGroupChats({@Default(BotCommandScopeType.allGroupChats) BotCommandScopeType type})
-
Represents the scope of bot commands, covering all group and supergroup chats.
constfactory
- BotCommandScope.allPrivateChats({@Default(BotCommandScopeType.allPrivateChats) @JsonKey(name: 'type') BotCommandScopeType type})
-
Represents the scope of bot commands, covering all private chats.
constfactory
- BotCommandScope.chat({@JsonKey(name: 'type') @Default(BotCommandScopeType.chat) BotCommandScopeType type, @JsonKey(name: 'chat_id') @IDConverter() required ID chatId})
-
Represents the scope of bot commands, covering a specific chat.
constfactory
- BotCommandScope.chatAdministrators({@Default(BotCommandScopeType.chatAdministrators) @JsonKey(name: 'type') BotCommandScopeType type, @JsonKey(name: 'chat_id') @IDConverter() required ID chatId})
-
Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
constfactory
- BotCommandScope.chatMember({@JsonKey(name: 'type') @Default(BotCommandScopeType.chatMember) BotCommandScopeType type, @JsonKey(name: 'chat_id') @IDConverter() required ID chatId, @JsonKey(name: 'user_id') required int userId})
-
Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
constfactory
- BotCommandScope.default_({@JsonKey(name: 'type') @Default(BotCommandScopeType.default_) BotCommandScopeType type})
-
Represents the scope of bot commands, covering all private chats.
constfactory
-
BotCommandScope.fromJson(Map<
String, Object?> json) -
factory
Properties
-
copyWith
→ $BotCommandScopeCopyWith<
BotCommandScope> -
Create a copy of BotCommandScope
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → BotCommandScopeType
-
Scope type, always be BotCommandScopeType.default_
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this BotCommandScope to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited