public override bool PreconditionCheck(IDMCommandContext context, out string message) { if (MinecraftGuildModel.TryGetGuildOfUser(context.User.Id, out MinecraftGuild userGuild, true)) { if (userGuild.Active) { if (userGuild.GetMemberRank(context.User.Id) >= RequiredRank) { message = null; return(true); } else { message = $"You do not have the required rank of `{RequiredRank}` in {userGuild.Name}"; return(false); } } else { message = $"Your guild {userGuild.Name} is inactive!"; return(false); } }
public Task ExecuteAsync() { Guild.MemberIds.Add(UserId); return(MinecraftGuildModel.SaveAll()); }
public Task ExecuteAsync() { return(MinecraftGuildModel.DeleteGuildDatasetAsync(Guild)); }