public SqlTwitchUserPoints(SqlTwitchUser user, SqlTwitchChannel channel, ulong points = 0, DateTime timeOfLastBonus = default(DateTime)) : base(new object[] { user.id, channel.user.id, points, timeOfLastBonus }) { user.Save(); this.user = user; this.channel = channel; }
public SqlTwitchChannel(SqlTwitchUser user, bool isLive = false, string previewImageUrl = null, string game = null, uint liveViewers = 0, uint totalViews = 0, uint followers = 0) : base(new object[] { user.id, isLive, previewImageUrl, game, liveViewers, totalViews, followers }) { this.user = user; }
public SqlTwitchBot(SqlTwitchUser user, string oauthPassword = null) : base(new object[] { user.id, oauthPassword }) { this.user = user; }
public SqlTwitchFollower(SqlTwitchUser user, SqlTwitchChannel channel, DateTime created = default(DateTime), bool isCurrentlyFollowing = false) : base(new object[] { user.id, channel.user.id, created, isCurrentlyFollowing }) { this.user = user; this.channel = channel; }
public static SqlTwitchUser[] GetAll() { List<object[]> results = _table.Select(null, null, null, null, null, 0); if (results != null) { SqlTwitchUser[] users = new SqlTwitchUser[results.Count]; for (int i = 0; i < results.Count; i++) { users[i] = new SqlTwitchUser(results[i][0].FromSql<uint>(), results[i][1].FromSql<string>(), results[i][2].FromSql<DateTime>(), results[i][3].FromSql<string>(), results[i][4].FromSql<string>()); } return users; } else { return null; } }