public async Task GetInfo(string name) { // Prioritize species first. Species[] species = await BotUtils.GetSpeciesFromDb("", name); if (species.Count() > 0) { if (await BotUtils.ReplyValidateSpeciesAsync(Context, species)) { await SpeciesCommands.ShowSpeciesInfoAsync(Context, species[0]); } } else { // Otherwise, show other taxon. Taxon[] taxa = await BotUtils.GetTaxaFromDb(name); if (taxa.Count() <= 0) { // This command was traditionally used with species, so show the user species suggestions in the event of no matches. await BotUtils.ReplyAsync_SpeciesSuggestions(Context, "", name, async (BotUtils.ConfirmSuggestionArgs args) => await GetInfo(args.Suggestion)); } else if (await BotUtils.ReplyAsync_ValidateTaxa(Context, taxa)) { await BotUtils.Command_ShowTaxon(Context, taxa[0].type, name); } } }
public async Task Genus(string name = "") { await BotUtils.Command_ShowTaxon(Context, TaxonRank.Genus, name); }
public async Task Domain(string name = "") { await BotUtils.Command_ShowTaxon(Context, TaxonRank.Domain, name); }
public async Task Kingdom(string name = "") { await BotUtils.Command_ShowTaxon(Context, TaxonRank.Kingdom, name); }
public async Task Order(string name = "") { await BotUtils.Command_ShowTaxon(Context, TaxonRank.Order, name); }
public async Task Family(string name = "") { await BotUtils.Command_ShowTaxon(Context, TaxonRank.Family, name); }