Beispiel #1
0
 static void Instance_OnEvent(object sender, SlackEventArgs e)
 {
     var instance = sender as Slack;
     if (e.Data.Type == "hello")
     {
         Console.WriteLine("Connected to '{0}' as '{1}'", instance.TeamInfo.Name, instance.Self.Name);
         foreach (var c in instance.JoinedChannels)
         {
                 Console.WriteLine("Member of: {0}", c.Name);
         }
         //instance.SendMessage("#botspam", "Whoo! Spam from a bot!");
     }
     else if (e.Data.Type == "message")
     {
         var message = e.Data as Message;
         Console.WriteLine(SubstituteMarkup(message.ToString(), instance));
     }
     else
     {
         Console.WriteLine(e.Data.Type);
         Console.WriteLine(">{0}", e.Data);
     }
 }
Beispiel #2
0
 private void Slack_OnAck(object sender, SlackEventArgs e)
 {
     var ack = (e.Data as Ack);
 }
Beispiel #3
0
 private void Slack_OnAck(object sender, SlackEventArgs e)
 {
     var ack = (e.Data as Ack);
 }