BotCommands.fromJson constructor

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

Parse from a json

Implementation

factory BotCommands.fromJson(Map<String, dynamic> json) => BotCommands(
      botUserId: json['bot_user_id'],
      commands: List<BotCommand>.from((json['commands'] ?? [])
          .map((item) => BotCommand.fromJson(item))
          .toList()),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );