aboutsummaryrefslogtreecommitdiff
path: root/src/commands/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/mod.rs')
-rw-r--r--src/commands/mod.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index b0ef83b..a5ee1bd 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -1,8 +1,8 @@
use poise::builtins::PrettyHelpConfiguration;
use crate::{
- commands::playback::_play,
PoiseContext,
+ commands::playback::_play,
};
#[cfg(feature = "games")]
@@ -42,20 +42,16 @@ pub fn commands() -> Vec<poise::Command<crate::PoiseData, anyhow::Error>> {
/// Print this help text.
#[poise::command(prefix_command, aliases("halp"))]
pub async fn help(ctx: PoiseContext<'_>, command: Option<String>) -> anyhow::Result<()> {
- poise::builtins::pretty_help(
- ctx,
- command.as_ref().map(|x| x.as_str()),
- PrettyHelpConfiguration {
- ..Default::default()
- },
- )
+ poise::builtins::pretty_help(ctx, command.as_deref(), PrettyHelpConfiguration {
+ ..Default::default()
+ })
.await?;
Ok(())
}
pub async fn link_unrecognized(ctx: PoiseContext<'_>, u: url::Url) -> anyhow::Result<()> {
- let _ = _play(ctx, &u).await?;
+ _play(ctx, &u).await?;
Ok(())
}