From 335f6203cc4b09452527651d580f1476c0d7d328 Mon Sep 17 00:00:00 2001 From: Ske Date: Tue, 14 Jan 2020 12:41:28 +0100 Subject: [PATCH] Restrict pk;random to public members --- PluralKit.Bot/Commands/MemberCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Bot/Commands/MemberCommands.cs b/PluralKit.Bot/Commands/MemberCommands.cs index 323e4651..d4d57d6c 100644 --- a/PluralKit.Bot/Commands/MemberCommands.cs +++ b/PluralKit.Bot/Commands/MemberCommands.cs @@ -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);