public static TwitchUserPoints[] GetTopUsersForChannel(TwitchChannel channel, uint count)
{
List<object[]> results = _table.Select(null, null, "ChannelUserId=?a", new object[] { channel.user.id }, "Points Desc", count);
if(results != null && results.Count > 0) {
TwitchUserPoints[] points = new TwitchUserPoints[results.Count];
for(int i = 0; i < results.Count; i++) {
points[i] = new SqlTwitchUserPoints(new SqlTwitchUser((uint)results[i][0]), channel, (ulong)results[i][2], (DateTime)results[i][3]);
}
return points;
}
return null;
}