Example #1
0
        public void CloseAllChatConnections()
        {
            foreach (var chat in ConnectedChats.Values)
            {
                chat.Dispose();
            }

            ConnectedChats.Clear();
        }
Example #2
0
        public TwitchChat ConnectToChat(string channel = null)
        {
            channel = (channel ?? ChannelName).ToLower();
            if (ConnectedChats.ContainsKey(channel))
            {
                throw new ArgumentException("Already connected to channel");
            }
            var chat = new TwitchChat(AccessToken, channel);

            ConnectedChats.Add(channel, chat);
            return(chat);
        }