From 90754143ce9d6ba3f36715cd7bfad6ad6403bce2 Mon Sep 17 00:00:00 2001 From: minneelyyyy Date: Tue, 24 Dec 2024 14:43:39 -0500 Subject: [PATCH] add basic help menu --- src/commands/mod.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 9792b03..9e126e5 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -8,10 +8,21 @@ mod eval; mod self_roles; mod settings; -use crate::common::{Data, Error}; +use crate::common::{Data, Error, Context}; + +/// Display a help menu +#[poise::command(prefix_command, slash_command)] +async fn help(ctx: Context<'_>, + #[description = "Specific command to get help with"] + command: Option) -> Result<(), Error> +{ + poise::builtins::help(ctx, command.as_deref(), poise::builtins::HelpConfiguration::default()).await?; + Ok(()) +} pub fn commands() -> Vec> { vec![ + help(), ping::ping(), dox::dox(), yeehaw::yeehaw(),