fix(bot): normalize alias for random and remove commands

This commit is contained in:
Ouroboros 2024-11-08 02:02:41 +00:00 committed by GitHub
parent 50943e6322
commit c5613f1969
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -369,7 +369,7 @@ public partial class CommandTree
if (ctx.Match("add", "a"))
await ctx.Execute<GroupMember>(MemberGroupAdd,
m => m.AddRemoveGroups(ctx, target, Groups.AddRemoveOperation.Add));
else if (ctx.Match("remove", "rem", "r"))
else if (ctx.Match("remove", "rem"))
await ctx.Execute<GroupMember>(MemberGroupRemove,
m => m.AddRemoveGroups(ctx, target, Groups.AddRemoveOperation.Remove));
else
@ -429,12 +429,12 @@ public partial class CommandTree
else if (ctx.Match("add", "a"))
await ctx.Execute<GroupMember>(GroupAdd,
g => g.AddRemoveMembers(ctx, target, Groups.AddRemoveOperation.Add));
else if (ctx.Match("remove", "rem", "r"))
else if (ctx.Match("remove", "rem"))
await ctx.Execute<GroupMember>(GroupRemove,
g => g.AddRemoveMembers(ctx, target, Groups.AddRemoveOperation.Remove));
else if (ctx.Match("members", "list", "ms", "l", "ls"))
await ctx.Execute<GroupMember>(GroupMemberList, g => g.ListGroupMembers(ctx, target));
else if (ctx.Match("random", "rand"))
else if (ctx.Match("random", "rand", "r"))
await ctx.Execute<Random>(GroupMemberRandom, r => r.GroupMember(ctx, target));
else if (ctx.Match("privacy"))
await ctx.Execute<Groups>(GroupPrivacy, g => g.GroupPrivacy(ctx, target, null));