From f14901a4e38a7bec4b0148ea7f9a3cf9e032d06a Mon Sep 17 00:00:00 2001 From: dusk Date: Tue, 7 Oct 2025 14:47:35 +0000 Subject: [PATCH] implement misc commands --- PluralKit.Bot/CommandMeta/CommandTree.cs | 4 ++-- crates/command_definitions/src/misc.rs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/PluralKit.Bot/CommandMeta/CommandTree.cs b/PluralKit.Bot/CommandMeta/CommandTree.cs index 1aefe854..2aa901ca 100644 --- a/PluralKit.Bot/CommandMeta/CommandTree.cs +++ b/PluralKit.Bot/CommandMeta/CommandTree.cs @@ -15,6 +15,8 @@ public partial class CommandTree "For the list of commands, see the website: "), Commands.HelpProxy => ctx.Reply( "The proxy help page has been moved! See the website: https://pluralkit.me/guide#proxying"), + Commands.Invite => ctx.Execute(Invite, m => m.Invite(ctx)), + Commands.Stats => ctx.Execute(null, m => m.Stats(ctx)), Commands.MemberShow(var param, var flags) => ctx.Execute(MemberInfo, m => m.ViewMember(ctx, param.target, flags.show_embed)), Commands.MemberNew(var param, _) => ctx.Execute(MemberNew, m => m.NewMember(ctx, param.name)), Commands.MemberSoulscream(var param, _) => ctx.Execute(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(Invite, m => m.Invite(ctx)); - if (ctx.Match("stats", "status")) return ctx.Execute(null, m => m.Stats(ctx)); } private async Task CommandHelpRoot(Context ctx) diff --git a/crates/command_definitions/src/misc.rs b/crates/command_definitions/src/misc.rs index a649599d..a87f4d1b 100644 --- a/crates/command_definitions/src/misc.rs +++ b/crates/command_definitions/src/misc.rs @@ -1,5 +1,10 @@ use super::*; pub fn cmds() -> impl Iterator { - [].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() }