BotCommands.fromJson constructor

BotCommands.fromJson(
  1. Map<String, dynamic> json
)

Parses a BotCommands from TDLib JSON.

Implementation

factory BotCommands.fromJson(Map<String, dynamic> json) => BotCommands(
      botUserId: _readInt(json['bot_user_id']),
      commands: _readList<BotCommand>(
          json['commands'], (e) => _readObject(e, BotCommand.fromJson)),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );