mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
Restrict pk;random to public members
This commit is contained in:
parent
f10685acd4
commit
335f6203cc
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ 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)).ToList();
|
||||
var members = (await _data.GetSystemMembers(ctx.System)).Where(m => m.MemberPrivacy == PrivacyLevel.Public).ToList();
|
||||
if (members == null || !members.Any())
|
||||
throw Errors.NoMembersError;
|
||||
var randInt = randGen.Next(members.Count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue