Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 public async Task CheckBanAsync(string id) => await ReplyAsync(GlobalBan.IsBanned(id)?$"{id} is abuse-banned" : $"{id} is not abuse-banned").ConfigureAwait(false);