internal static RestApplicationCommand Create(BaseDiscordClient client, Model model, RestApplicationCommandType type, ulong guildId = 0) { if (type == RestApplicationCommandType.GlobalCommand) { return(RestGlobalCommand.Create(client, model)); } if (type == RestApplicationCommandType.GuildCommand) { return(RestGuildCommand.Create(client, model, guildId)); } return(null); }
internal static RestApplicationCommand Create(BaseDiscordClient client, Model model, RestApplicationCommandType type, ulong guildId = 0) { return(type switch { RestApplicationCommandType.GlobalCommand => RestGlobalCommand.Create(client, model), RestApplicationCommandType.GuildCommand => RestGuildCommand.Create(client, model, guildId), _ => null });