public void CloseAllChatConnections() { foreach (var chat in ConnectedChats.Values) { chat.Dispose(); } ConnectedChats.Clear(); }
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); }