create static method

BotCommand create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "botCommand",
  3. String special_return_type = "botCommand",
  4. String? command,
  5. String? description,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static BotCommand create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "botCommand",
  String special_return_type = "botCommand",
  String? command,
  String? description,
}) {
  // BotCommand botCommand = BotCommand({
  final Map botCommand_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "command": command,
    "description": description,
  };

  botCommand_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (botCommand_data_create_json.containsKey(key) == false) {
        botCommand_data_create_json[key] = value;
      }
    });
  }
  return BotCommand(botCommand_data_create_json);
}