create static method
BotCommands
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "botCommands",
- String special_return_type = "botCommands",
- num? bot_user_id,
- List<
BotCommand> ? commands,
override
Generate By General Universe Script Dont edit by hand or anything manual
Implementation
static BotCommands create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "botCommands",
String special_return_type = "botCommands",
num? bot_user_id,
List<BotCommand>? commands,
}) {
// BotCommands botCommands = BotCommands({
final Map botCommands_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"bot_user_id": bot_user_id,
"commands": (commands != null) ? commands.toJson() : null,
};
botCommands_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (botCommands_data_create_json.containsKey(key) == false) {
botCommands_data_create_json[key] = value;
}
});
}
return BotCommands(botCommands_data_create_json);
}