From 501ba27e1cd52741988113ef47ee0fad7d0a5799 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Tue, 6 Aug 2024 16:32:35 -0400 Subject: fixup unknown command, document commands --- src/commands/mod.rs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src/commands/mod.rs') diff --git a/src/commands/mod.rs b/src/commands/mod.rs index ba87adb..1ad4a59 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -20,17 +20,9 @@ pub(crate) mod today; pub use self::meme::*; pub fn commands() -> Vec> { - let mut commands = vec![ - playback::play(), - playback::pause(), - playback::resume(), - playback::die(), - playback::list(), - sound_levels::mute(), - sound_levels::unmute(), - roll::roll(), - help(), - ]; + let mut commands = vec![sound_levels::mute(), sound_levels::unmute(), roll::roll(), help()]; + + commands.extend(playback::commands()); #[cfg(feature = "games")] commands.extend(game::commands()); @@ -41,7 +33,8 @@ pub fn commands() -> Vec> { commands } -#[poise::command(slash_command, prefix_command, aliases("halp"))] +/// Print this help text. +#[poise::command(prefix_command, aliases("halp"))] pub async fn help(ctx: PoiseContext<'_>, command: Option) -> anyhow::Result<()> { poise::builtins::pretty_help( ctx, -- cgit v1.3.1