BotCommandScope.chatMember constructor

const BotCommandScope.chatMember({
  1. @JsonKey(name: 'type') @Default(BotCommandScopeType.chatMember) BotCommandScopeType type,
  2. @JsonKey(name: 'chat_id') @IDConverter() required ID chatId,
  3. @JsonKey(name: 'user_id') required int userId,
})

Represents the scope of bot commands, covering a specific member of a group or supergroup chat.

Implementation

const factory BotCommandScope.chatMember({
  /// Scope type, always be [BotCommandScopeType.chatMember]
  @JsonKey(name: 'type')
  @Default(BotCommandScopeType.chatMember)
  final BotCommandScopeType type,

  /// Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
  @JsonKey(name: 'chat_id') @IDConverter() required final ID chatId,

  /// Unique identifier of the target user
  @JsonKey(name: 'user_id') required final int userId,
}) = BotCommandScopeChatMember;