mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 01:30:13 +00:00
remove rest of the parsing in csharp bot
This commit is contained in:
parent
15ffd16c01
commit
479e0a59b5
35 changed files with 242 additions and 409 deletions
|
|
@ -51,7 +51,7 @@ public class GroupMember
|
|||
groups.Count - toAction.Count));
|
||||
}
|
||||
|
||||
public async Task ListMemberGroups(Context ctx, PKMember target, string? query, IHasListOptions flags)
|
||||
public async Task ListMemberGroups(Context ctx, PKMember target, string? query, IHasListOptions flags, bool all)
|
||||
{
|
||||
var targetSystem = await ctx.Repository.GetSystem(target.System);
|
||||
var opts = flags.GetListOptions(ctx, target.System);
|
||||
|
|
@ -80,10 +80,10 @@ public class GroupMember
|
|||
title.Append($" matching **{opts.Search.Truncate(100)}**");
|
||||
|
||||
await ctx.RenderGroupList(ctx.LookupContextFor(target.System), target.System, title.ToString(),
|
||||
target.Color, opts);
|
||||
target.Color, opts, all);
|
||||
}
|
||||
|
||||
public async Task AddRemoveMembers(Context ctx, PKGroup target, List<PKMember> _members, Groups.AddRemoveOperation op, bool all)
|
||||
public async Task AddRemoveMembers(Context ctx, PKGroup target, List<PKMember> _members, Groups.AddRemoveOperation op, bool all, bool confirmYes)
|
||||
{
|
||||
ctx.CheckOwnGroup(target);
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ public class GroupMember
|
|||
.Where(m => existingMembersInGroup.Contains(m.Value))
|
||||
.ToList();
|
||||
|
||||
if (all && !await ctx.PromptYesNo($"Are you sure you want to remove all members from group {target.Reference(ctx)}?", "Empty Group")) throw Errors.GenericCancelled();
|
||||
if (all && !await ctx.PromptYesNo($"Are you sure you want to remove all members from group {target.Reference(ctx)}?", "Empty Group", flagValue: confirmYes)) throw Errors.GenericCancelled();
|
||||
|
||||
await ctx.Repository.RemoveMembersFromGroup(target.Id, toAction);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue