Exemplo n.º 1
0
 public async Task restrainCmd(string username, double timeInSeconds = 60)
 {
     username = AliasUtils.getNameFromAlias(username);
     if (username != "null")
     {
         if (MasterUtils.ContainsAny(Context.User.ToString(), GlobalVars.ADMINS))
         {
             AdminUtils.addRestriction(username, timeInSeconds);
             await Context.Channel.SendMessageAsync(username + " is restrained for " + timeInSeconds + "s!");
         }
         else
         {
             await Context.Channel.SendMessageAsync("\"Get Fukt Idiot\" - Nickalodeon 2017");
         }
     }
     else
     {
         await Context.Channel.SendMessageAsync("Unregistered Username");
     }
 }
Exemplo n.º 2
0
 public async Task RemoveRestrainCmd(string username)
 {
     username = AliasUtils.getNameFromAlias(username);
     if (username != "null")
     {
         string userName = Context.User.ToString();
         if (MasterUtils.ContainsAny(Context.User.ToString(), GlobalVars.ADMINS))
         {
             AdminUtils.RemoveRestrain(username);
             await Context.Channel.SendMessageAsync(username + " is no longer restrained!");
         }
         else
         {
             await Context.Channel.SendMessageAsync("\"Get Fukt Idiot\" - Nickalodeon 2017");
         }
     }
     else
     {
         await Context.Channel.SendMessageAsync("Unregistered Username");
     }
 }