public TwitchIrcConnection(SqlTwitchBot bot, bool whisperServer)
        {
            this.bot = bot;
            this.whisperServer = whisperServer;

            Reconnect();
        }
Example #2
0
        public static TwitchBot[] GetAll()
        {
            List <object[]> results = _table.Select(null, null, null, null, null, 0);

            if (results != null)
            {
                TwitchBot[] bots = new TwitchBot[results.Count];
                for (int i = 0; i < results.Count; i++)
                {
                    bots[i] = new SqlTwitchBot(new SqlTwitchUser(results[i][0].FromSql <uint>()), results[i][1].FromSql <string>());
                }

                return(bots);
            }
            else
            {
                return(null);
            }
        }
Example #3
0
 static string GetJson(SqlTwitchBot bot, uint limit, uint offset, string path)
 {
     return WebClient.GetHTML("https://api.twitch.tv/kraken/" + path + "&oauth_token=" + bot.oauthPassword + "&limit=" + limit
         + "&offset=" + offset);
 }