Exemplo n.º 1
0
        public static async Task <bool> ReplyValidateGotchiAsync(this OfcModuleBase moduleBase, Gotchi gotchi)
        {
            if (!gotchi.IsValid())
            {
                await moduleBase.ReplyInfoAsync("You don't have a gotchi yet! Get one with `gotchi get <species>`.");

                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public async Task Release()
        {
            Gotchi gotchi = await Db.GetGotchiAsync(Context.User.ToCreator());

            if (gotchi.IsValid())
            {
                await ReleaseGotchiAsync(gotchi);
            }
            else
            {
                await ReplyErrorAsync("You do not have a gotchi to release.");
            }
        }
Exemplo n.º 3
0
        public async Task Release(string name)
        {
            // Find the Gotchi with the given name.

            Gotchi gotchi = await Db.GetGotchiAsync(Context.User.Id, name);

            if (gotchi.IsValid())
            {
                await ReleaseGotchiAsync(gotchi);
            }
            else
            {
                await ReplyErrorAsync(string.Format("No Gotchi with the name \"{0}\" exists.", name));
            }
        }