diff --git a/PluralKit.Bot/Commands/GroupMember.cs b/PluralKit.Bot/Commands/GroupMember.cs index f3522df1..658f75fc 100644 --- a/PluralKit.Bot/Commands/GroupMember.cs +++ b/PluralKit.Bot/Commands/GroupMember.cs @@ -86,10 +86,22 @@ public class GroupMember { ctx.CheckOwnGroup(target); - var members = (await ctx.ParseMemberList(ctx.System.Id)) + List members; + if (ctx.MatchFlag("all", "a")) + { + members = (await ctx.Database.Execute(conn => conn.QueryMemberList(target.System, + new DatabaseViewsExt.ListQueryOptions { }))) + .Select(m => m.Id) + .Distinct() + .ToList(); + } + else + { + members = (await ctx.ParseMemberList(ctx.System.Id)) .Select(m => m.Id) .Distinct() .ToList(); + } var existingMembersInGroup = (await ctx.Database.Execute(conn => conn.QueryMemberList(target.System, new DatabaseViewsExt.ListQueryOptions { GroupFilter = target.Id }))) diff --git a/docs/content/tips-and-tricks.md b/docs/content/tips-and-tricks.md index 374ba566..2385ab70 100644 --- a/docs/content/tips-and-tricks.md +++ b/docs/content/tips-and-tricks.md @@ -77,6 +77,7 @@ You cannot look up private members or groups of another system. |pk;system frontpercent|-flat||Show "flat" frontpercent - percentages add up to 100%| |pk;group \ frontpercent|-fronters-only|-fo|Show a group's frontpercent without the "no fronter" entry| |pk;group \ frontpercent|-flat||Show "flat" frontpercent - percentages add up to 100%| +|pk;group \ \|-all|-a|Add or remove all members from a group.| |pk;edit|-append|-a|Append the new content to the old message instead of overwriting it| |pk;edit|-prepend|-p|Prepend the new content to the old message instead of overwriting it| |pk;edit|-nospace|-ns|Append/prepend without adding a space|