Add front history pagination; upgrade more store methods

This commit is contained in:
Ske
2020-01-18 00:58:35 +01:00
parent 8a689ac0f2
commit b347d2d557
8 changed files with 178 additions and 109 deletions

View File

@@ -65,7 +65,8 @@ namespace PluralKit.Bot.Commands
var randGen = new System.Random();
//Maybe move this somewhere else in the file structure since it doesn't need to get created at every command
var members = (await _data.GetSystemMembers(ctx.System)).Where(m => m.MemberPrivacy == PrivacyLevel.Public).ToList();
// TODO: don't buffer these, find something else to do ig
var members = await _data.GetSystemMembers(ctx.System).Where(m => m.MemberPrivacy == PrivacyLevel.Public).ToListAsync();
if (members == null || !members.Any())
throw Errors.NoMembersError;
var randInt = randGen.Next(members.Count);