Ejemplo n.º 1
0
        public async Task PetUser(PetGame pet, string args)
        {
            if (string.IsNullOrWhiteSpace(args))
            {
                await ReplyAsync("You must specify a user!");

                return;
            }

            var user = await Context.ParseUserAsync(args);

            if (user == null)
            {
                await ReplyAsync("Can't find the specified user!");

                return;
            }

            pet = Storage.GetUserGame <PetGame>(user.Id);

            if (pet == null)
            {
                await ReplyAsync("This person doesn't have a pet :(");
            }
            else
            {
                await ReplyAsync(pet.GetContent(), pet.GetEmbed(user));
            }
        }
Ejemplo n.º 2
0
        public async Task PetExact(PetGame pet, string args)
        {
            var user = Context.User as SocketGuildUser;

            if (!string.IsNullOrWhiteSpace(args))
            {
                var other = await Context.ParseUserAsync(args);

                if (other != null)
                {
                    user = other;
                    pet  = Storage.GetUserGame <PetGame>(user.Id);
                    if (pet == null)
                    {
                        await ReplyAsync("This person doesn't have a pet :(");

                        return;
                    }
                }
            }

            await ReplyAsync(pet.GetContent(), pet.GetEmbed(user, decimals: true));
        }
Ejemplo n.º 3
0
 public async Task Pet(PetGame pet, string args)
 {
     await ReplyAsync(pet.GetContent(), pet.GetEmbed(Context.User as IGuildUser));
 }