Bot.fromJson constructor

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

Implementation

factory Bot.fromJson(Map<String, dynamic> json) => Bot(
  nick: json['nick'] as String,
  id: json['id'] == null ? null : json['id'] as String,
  from_config: json['from_config'] as bool,
  commands: (json['commands'] as List).map((e) => BotCommand.fromJson(e as Map<String, dynamic>)).toList(),
);