public async Task BanAsync(string id) { if (GlobalBan.IsBanned(id)) { await ReplyAsync($"{id} is already abuse-banned").ConfigureAwait(false); } else { GlobalBan.Ban(id); await ReplyAsync($"{id} has been abuse-banned.").ConfigureAwait(false); } }
public async Task UnBanAsync(string id) { if (GlobalBan.IsBanned(id)) { GlobalBan.UnBan(id); await ReplyAsync($"{id} has been abuse-unbanned.").ConfigureAwait(false); } else { await ReplyAsync($"{id} could not be found in the ban list.").ConfigureAwait(false); } }
public async Task CheckBanAsync(string id) => await ReplyAsync(GlobalBan.IsBanned(id)?$"{id} is abuse-banned" : $"{id} is not abuse-banned").ConfigureAwait(false);