public async Task Poke(string content = "") { if (content == "") { await ReplyAsync("Please provide either an ID or Name of a pokemon"); return; } Console.WriteLine("Finding pokemon"); var poke = PokemonUtility.GetPokemon(content); Console.WriteLine("Pokemon Found"); if (poke.poke is null || poke.stat is null) { await ReplyAsync($"Unable to find Pokemon by {content}"); return; } var embed = PokemonUtility.PokeEmbed(poke.poke, poke.stat, poke.poke.Pic); await ReplyAsync(embed : embed.Build()); }
public async Task EqualStats(int total, int length = 0) { if (total < 2 || total > 6) { await ReplyAsync("Please provie a total between 2 and 6, including 2 and 6"); return; } var pokes = PokemonUtility.GetPokemonEqualStats(total, length); await PostList(pokes, $"{total} equal stats and name length of {length}"); }
public async Task EqualStatsAll(int total) { if (total < 2 || total > 6) { await ReplyAsync("Please provie a total between 2 and 6, including 2 and 6"); return; } var pokes = PokemonUtility.GetPokemonEqualStats(total, 0); await PostList(pokes, $"{total} equal stats"); }
public async Task RandomShiny() { using (var context = new AppDbContext()) { var poke = PokemonUtility.RandomPokemon(); if (poke.poke is null || poke.stat is null) { await ReplyAsync("Unable to find Random Pokemon with Stats"); return; } var embed = PokemonUtility.PokeEmbed(poke.poke, poke.stat, poke.poke.PicShiny); await ReplyAsync(embed : embed.Build()); } }
public async Task IncompleteName(string name) { Dictionary <char, int> dict = new Dictionary <char, int>(); int index = 0; int length = name.Length; foreach (char ch in name) { if (char.IsLetter(ch)) { Console.WriteLine($"Char: {ch}, Index: {index}"); dict.Add(ch, index); } index++; } var pokes = PokemonUtility.GetPokemonByIncompleteName(dict, length); await PostList(pokes, $"{name}"); }
public async Task ShinyPoke(string content = "") { if (content == "") { await ReplyAsync("Please provide either an ID or Name of a pokemon"); return; } var shiny = PokemonUtility.GetPokemon(content); if (shiny.poke is null || shiny.stat is null) { await ReplyAsync($"Unable to find Pokemon by {content}"); return; } var embed = PokemonUtility.PokeEmbed(shiny.poke, shiny.stat, shiny.poke.PicShiny); await ReplyAsync(embed : embed.Build()); }