Exemplo n.º 1
0
        public async Task poke(CommandContext ctx)
        {
            if (PokeController.IsGameStarted())
            {
                await ctx.RespondAsync(string.Format("Game already started!"));
            }
            else
            {
                await ctx.RespondAsync(string.Format("Guess that Pokémon: "));

                int pokeid = PokeController.GetRandomPokemonID();
                PokeController.SaveIDToFile(pokeid);
                await ctx.RespondWithFileAsync(PokeController.GetPokeFile(pokeid, false));
            }
        }
Exemplo n.º 2
0
        public async Task pokeguess(CommandContext ctx, [RemainingText, Description("Name of Pokémon.")] string pokename)
        {
            if (!PokeController.IsGameStarted())
            {
                await ctx.RespondAsync(string.Format("No current 'Guess That Pokémon' game started."));
            }
            else
            {
                if (PokeController.IsNameRight(pokename))
                {
                    await ctx.RespondAsync(string.Format("You {0} guessed right!", ctx.Member.Username));

                    await ctx.RespondWithFileAsync(PokeController.GetPokeFile(PokeController.GetIDFromFile(), true));

                    PokeController.EndGame();
                }
                else
                {
                    await ctx.RespondAsync(string.Format("You {0} guessed wrong!", ctx.Member.Username));
                }
            }
        }