Exemplo n.º 1
0
 public void Description()
 {
     commands.CreateCommand("Description")
     .Parameter("Description", ParameterType.Unparsed)
     .Do(async(e) =>
     {
         string returnstring = "";
         if (new ServerRepo(new ServerContext()).IsServerVerified(e.Server.Id) && new ServerRepo(new ServerContext()).IsAdmin(e.User.Id, e.Server.Id))
         {
             if (e.GetArg("Description") != "")
             {
                 if (e.GetArg("Description").Length <= 500)
                 {
                     new ServerRepo(new ServerContext()).SetServerGescriptiong(e.Server.Id, (e.GetArg("Description")));
                     Eng_Default.DescriptionSet();
                 }
                 else
                 {
                     returnstring = Eng_Default.DescriptionTooLong();
                 }
             }
             else
             {
                 returnstring = new ServerRepo(new ServerContext()).GetServerDescription(e.Server.Id);
             }
         }
         await e.Channel.SendMessage(returnstring);
     });
 }