public static SqlTwitchConnection[] GetAllAutoConnectingConnections(TwitchBot bot)
        {
            List <object[]> results = _table.Select(null, null, "BotUserId=?a and AutoConnectToChat=?b", new object[] { bot.user.id, true }, null, 0);

            if (results != null && results.Count > 0)
            {
                SqlTwitchConnection[] connections = new SqlTwitchConnection[results.Count];
                for (int i = 0; i < results.Count; i++)
                {
                    connections[i] = new SqlTwitchConnection(bot, new SqlTwitchChannel(new SqlTwitchUser((uint)results[i][1])), (ulong)results[i][2] != 0);
                }

                return(connections);
            }

            return(null);
        }
Exemplo n.º 2
0
 public TwitchAlert CreateSqlTwitchAlert(SqlTwitchConnection connection, string alertGuid, DateTime lastFollowerNotification = default(DateTime))
 {
     return(new SqlTwitchAlert(connection, alertGuid, lastFollowerNotification));
 }
Exemplo n.º 3
0
 public TwitchConnection[] GetAllAutoConnectingConnections(TwitchBot bot)
 {
     return(SqlTwitchConnection.GetAllAutoConnectingConnections(bot));
 }