fromJson static method

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

Implementation

static BotCommand? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return BotCommand(
    command: (json['command'] as String?) ?? '',
    description: (json['description'] as String?) ?? '',
    isEphemeral: (json['is_ephemeral'] as bool?) ?? false,
  );
}