public TwitchChatConnection(TwitchCredentials connectingUser, bool isBot = true)
        {
            this.connectedUser = connectingUser;
            this.isBot = isBot;

            // Connect to IRC Twitch and login with given TwitchCredentials
            // http://tmi.twitch.tv/servers?channel=riotgames
            ircClient = new BotIrcClient("irc.twitch.tv", 6667, connectingUser);

            // Request JOIN/PART notifications for bot account
            if (isBot)
            {
                ircClient.WriteLineThrottle("CAP REQ :twitch.tv/membership");
                ircClient.WriteLineThrottle("CAP REQ :twitch.tv/tags");
                ircClient.WriteLineThrottle("CAP REQ :twitch.tv/commands");
            }
            ChatMessageReceived += (s, e) =>
            {
            };
        }
Exemple #2
0
        public TwitchChatConnection(TwitchCredentials connectingUser, bool isBot = true)
        {
            this.connectedUser = connectingUser;
            this.isBot         = isBot;

            // Connect to IRC Twitch and login with given TwitchCredentials
            // http://tmi.twitch.tv/servers?channel=riotgames
            ircClient = new BotIrcClient("irc.twitch.tv", 6667, connectingUser);

            // Request JOIN/PART notifications for bot account
            if (isBot)
            {
                ircClient.WriteLineThrottle("CAP REQ :twitch.tv/membership");
                ircClient.WriteLineThrottle("CAP REQ :twitch.tv/tags");
                ircClient.WriteLineThrottle("CAP REQ :twitch.tv/commands");
            }
            ChatMessageReceived += (s, e) =>
            {
            };
        }