mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
implement misc commands
This commit is contained in:
parent
1627e25268
commit
f14901a4e3
2 changed files with 8 additions and 3 deletions
|
|
@ -15,6 +15,8 @@ public partial class CommandTree
|
|||
"For the list of commands, see the website: <https://pluralkit.me/commands>"),
|
||||
Commands.HelpProxy => ctx.Reply(
|
||||
"The proxy help page has been moved! See the website: https://pluralkit.me/guide#proxying"),
|
||||
Commands.Invite => ctx.Execute<Misc>(Invite, m => m.Invite(ctx)),
|
||||
Commands.Stats => ctx.Execute<Misc>(null, m => m.Stats(ctx)),
|
||||
Commands.MemberShow(var param, var flags) => ctx.Execute<Member>(MemberInfo, m => m.ViewMember(ctx, param.target, flags.show_embed)),
|
||||
Commands.MemberNew(var param, _) => ctx.Execute<Member>(MemberNew, m => m.NewMember(ctx, param.name)),
|
||||
Commands.MemberSoulscream(var param, _) => ctx.Execute<Member>(MemberInfo, m => m.Soulscream(ctx, param.target)),
|
||||
|
|
@ -331,8 +333,6 @@ public partial class CommandTree
|
|||
// Legacy command routing - these are kept for backwards compatibility until fully migrated to new system
|
||||
if (ctx.Match("commands", "cmd", "c"))
|
||||
return CommandHelpRoot(ctx);
|
||||
if (ctx.Match("invite")) return ctx.Execute<Misc>(Invite, m => m.Invite(ctx));
|
||||
if (ctx.Match("stats", "status")) return ctx.Execute<Misc>(null, m => m.Stats(ctx));
|
||||
}
|
||||
|
||||
private async Task CommandHelpRoot(Context ctx)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
use super::*;
|
||||
|
||||
pub fn cmds() -> impl Iterator<Item = Command> {
|
||||
[].into_iter()
|
||||
[
|
||||
command!("invite" => "invite").help("Gets a link to invite PluralKit to other servers"),
|
||||
command!(("stats", ["status"]) => "stats")
|
||||
.help("Shows statistics and information about PluralKit"),
|
||||
]
|
||||
.into_iter()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue