public bool VerifyLogin(string username, string password) { ShareSettings.Default.Reload(); AccessToken = ShareSettings.Default.TwitchAccessToken; if (VerifyAccessToken()) { Chat = new TwitchChat(AccessToken); return(true); } else { var form = new TwitchOAuthForm(); form.ShowDialog(); AccessToken = form.AccessToken; var verified = VerifyAccessToken(); if (verified) { Chat = new TwitchChat(AccessToken); } return(verified); } }
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); }
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; }