예제 #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);
        }
예제 #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.");
            }
        }
예제 #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));
            }
        }