public BotBackend(DiscordClient _c, string token)
 {
     c                  = _c;
     this.token         = token;
     c.MessageReceived += C_MessageReceived;
     last               = this;
 }
Exemplo n.º 2
0
 public BotBackend(DiscordClient _c, string token, ManageDiscordSettings s)
 {
     c                  = _c;
     this.token         = token;
     c.MessageReceived += C_MessageReceived;
     c.ServerAvailable += C_ServerAvailable;
     c.JoinedServer    += C_JoinedServer;
     c.LeftServer      += C_LeftServer;
     last               = this;
     this.mds           = s;
 }
Exemplo n.º 3
0
 private void checkBox3_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBox3.Checked)
     {
         if (backend == null)
         {
             backend = new BotBackend(new Discord.DiscordClient(), label2.Text, this);
             backend.reconnect();
         }
         else
         {
             backend.reconnect();
         }
     }
     else
     {
         backend.disconnect();
     }
 }