Exemplo n.º 1
0
 private void EnterChatroom()
 {
     _chatRoom               = new TwitchChatRoom(Settings.Default.Channel, Settings.Default.Username, Settings.Default.Password);
     _chatRoom.Connected    += ChatRoomOnConnected;
     _chatRoom.Disconnected += ChatRoomOnDisconnected;
     _chatRoom.Message      += ChatRoomOnMessage;
 }
Exemplo n.º 2
0
 public HelloCommand(TwitchChatRoom room) : base(room)
 {
     ChatCommand.Create(room, "hi", HiCommand, "Says hello", null, false, null, false);
     ChatCommand.Create(room, "echo", EchoCommand, "Echos what you say", null, false, null, false);
     ChatCommand.Create(room, "timemeout", TimeMeOut, "Shhh...", null, false, null, false);
     ChatCommand.Create(room, "banme", BanYouBecauseYouAreStupidAndYouShouldntHaveDoneThat, "This will ban you. Dont do it unless you want to be benned.", null, false, null, false);
     ChatCommand.Create(room, "about", About, "About the bot or sober.", null, false, null, false);
 }
 public void ObserveChatMessage(TwitchChatRoom room, TwitchUser speaker, string message)
 {
     if(this.room.Equals(room)) {
         if(message != null && message.StartsWith("!")) {
             ObserveCommand(speaker, message.Substring(1));
         }
     }
 }
Exemplo n.º 4
0
 public HelloCommand(TwitchChatRoom room)
     : base(room)
 {
     ChatCommand.Create(room, "hi", HiCommand, "Says hello", null, false, TimeSpan.FromSeconds(0), false);
     ChatCommand.Create(room, "echo", EchoCommand, "Echos what you say", null, false, TimeSpan.FromSeconds(0), false);
     ChatCommand.Create(room, "timemeout", TimeMeOut, "Shhh...", null, false, TimeSpan.FromSeconds(0), false);
     ChatCommand.Create(room, "banme", BanYouBecauseYouAreStupidAndYouShouldntHaveDoneThat, "This will ban you. Dont do it unless you want to be benned.", null, false, TimeSpan.FromSeconds(0), false);
 }
 public void ObserveChatMessage(TwitchChatRoom room, TwitchUser speaker, string message)
 {
     if (this.room.Equals(room))
     {
         if (message != null && message.StartsWith("!"))
         {
             ObserveCommand(speaker, message.Substring(1));
         }
     }
 }
 public TwitchEventHandler(TwitchChatRoom room)
 {
     this.room = room;
 }
 public TwitchCommandListener(TwitchChatRoom room)
 {
     this.room = room;
     TwitchChatMessage.RegisterObserver(this.ObserveChatMessage);
 }
 public TwitchCommandListener(TwitchChatRoom room)
 {
     this.room = room;
     TwitchChatMessage.RegisterObserver(this.ObserveChatMessage);
 }
Exemplo n.º 9
0
 public TwitchEventHandler(TwitchChatRoom room)
 {
     this.room = room;
 }