toJson method

Map<String, dynamic> toJson()

Converts a BotCommandScope to a Map for JSON encoding.

Implementation

Map<String, dynamic> toJson() {
  return {
    'type': type.toJson(),
  }..removeWhere(_nullFilter);
}