feat: add some aliases (pk;ls and -wprns) (#432)

This commit is contained in:
Jake Fulmine 2022-03-30 11:42:34 +02:00 committed by GitHub
parent dce29ec933
commit 494f93d629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ public partial class CommandTree
return HandleAutoproxyCommand(ctx);
if (ctx.Match("config", "cfg"))
return HandleConfigCommand(ctx);
if (ctx.Match("list", "find", "members", "search", "query", "l", "f", "fd"))
if (ctx.Match("list", "find", "members", "search", "query", "l", "f", "fd", "ls"))
return ctx.Execute<SystemList>(SystemList, m => m.MemberList(ctx, ctx.System));
if (ctx.Match("link"))
return ctx.Execute<SystemLink>(Link, m => m.LinkSystem(ctx));
@ -221,7 +221,7 @@ public partial class CommandTree
await ctx.CheckSystem(target).Execute<SystemEdit>(SystemBannerImage, m => m.BannerImage(ctx, target));
else if (ctx.Match("avatar", "picture", "icon", "image", "pic", "pfp"))
await ctx.CheckSystem(target).Execute<SystemEdit>(SystemAvatar, m => m.Avatar(ctx, target));
else if (ctx.Match("list", "l", "members"))
else if (ctx.Match("list", "l", "members", "ls"))
await ctx.CheckSystem(target).Execute<SystemList>(SystemList, m => m.MemberList(ctx, target));
else if (ctx.Match("find", "search", "query", "fd", "s"))
await ctx.CheckSystem(target).Execute<SystemList>(SystemFind, m => m.MemberList(ctx, target));
@ -348,7 +348,7 @@ public partial class CommandTree
else if (ctx.Match("remove", "rem", "r"))
await ctx.Execute<GroupMember>(GroupRemove,
g => g.AddRemoveMembers(ctx, target, Groups.AddRemoveOperation.Remove));
else if (ctx.Match("members", "list", "ms", "l"))
else if (ctx.Match("members", "list", "ms", "l", "ls"))
await ctx.Execute<GroupMember>(GroupMemberList, g => g.ListGroupMembers(ctx, target));
else if (ctx.Match("random"))
await ctx.Execute<Random>(GroupMemberRandom, r => r.GroupMember(ctx, target));

View File

@ -71,7 +71,7 @@ public static class ContextListExt
p.IncludeCreated = true;
if (ctx.MatchFlag("with-avatar", "with-image", "with-icon", "wa", "wi", "ia", "ii", "img"))
p.IncludeAvatar = true;
if (ctx.MatchFlag("with-pronouns", "wp"))
if (ctx.MatchFlag("with-pronouns", "wp", "wprns"))
p.IncludePronouns = true;
if (ctx.MatchFlag("with-displayname", "wdn"))
p.IncludeDisplayName = true;

View File

@ -63,7 +63,7 @@ You cannot look up private members or groups of another system.
|-with-message-count|-wmc|Member|Show each member's message count|
|-with-created|-wc|Member, Group|Show each item's creation date|
|-with-avatar|-wa, -wi, -ia, -ii, -img|Member, Group|Show each item's avatar URL|
|-with-pronouns|-wp|Member|Show each member's pronouns in the short list (shown by default in full list)|
|-with-pronouns|-wp -wprns|Member|Show each member's pronouns in the short list (shown by default in full list)|
|-with-displayname|-wdn|Member, Group|Show each item's displayname|
## Miscellaneous flags