예제 #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);
     }
 }
예제 #2
0
 private void Slack_OnAck(object sender, SlackEventArgs e)
 {
     var ack = (e.Data as Ack);
 }
예제 #3
0
파일: Slack.cs 프로젝트: hach-que/slack-rtm
 private void Slack_OnAck(object sender, SlackEventArgs e)
 {
     var ack = (e.Data as Ack);
 }