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