From f32228e61f0b5d0ebed9afb4934aefad423a14d7 Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 9 Apr 2021 16:16:02 +0200 Subject: [PATCH] Remove prefix from music group Signed-off-by: trivernis --- src/commands/music/{clear.rs => clear_queue.rs} | 2 +- src/commands/music/lyrics.rs | 6 +++++- src/commands/music/mod.rs | 7 +++---- src/commands/music/play_next.rs | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) rename src/commands/music/{clear.rs => clear_queue.rs} (90%) diff --git a/src/commands/music/clear.rs b/src/commands/music/clear_queue.rs similarity index 90% rename from src/commands/music/clear.rs rename to src/commands/music/clear_queue.rs index aa75c0d..8d83456 100644 --- a/src/commands/music/clear.rs +++ b/src/commands/music/clear_queue.rs @@ -11,7 +11,7 @@ use crate::commands::music::get_queue_for_guild; #[usage("")] #[aliases("cl")] #[allowed_roles("DJ")] -async fn clear(ctx: &Context, msg: &Message) -> CommandResult { +async fn clear_queue(ctx: &Context, msg: &Message) -> CommandResult { let guild = msg.guild(&ctx.cache).await.unwrap(); log::debug!("Clearing queue for guild {}", guild.id); diff --git a/src/commands/music/lyrics.rs b/src/commands/music/lyrics.rs index 3fa7595..84ec030 100644 --- a/src/commands/music/lyrics.rs +++ b/src/commands/music/lyrics.rs @@ -28,7 +28,11 @@ async fn lyrics(ctx: &Context, msg: &Message) -> CommandResult { msg.channel_id .send_message(ctx, |m| { - m.embed(|e| e.title(format!("Lyrics for {}", title)).description(lyrics)) + m.embed(|e| { + e.title(format!("Lyrics for {} by {}", title, author)) + .description(lyrics) + .footer(|f| f.text("Powered by lyricsovh")) + }) }) .await?; } else { diff --git a/src/commands/music/mod.rs b/src/commands/music/mod.rs index c5b5529..e48bab4 100644 --- a/src/commands/music/mod.rs +++ b/src/commands/music/mod.rs @@ -12,7 +12,7 @@ use songbird::{ }; use tokio::sync::Mutex; -use clear::CLEAR_COMMAND; +use clear_queue::CLEAR_QUEUE_COMMAND; use current::CURRENT_COMMAND; use join::JOIN_COMMAND; use leave::LEAVE_COMMAND; @@ -36,7 +36,7 @@ use regex::Regex; use std::sync::atomic::{AtomicIsize, AtomicUsize, Ordering}; use std::time::Duration; -mod clear; +mod clear_queue; mod current; mod join; mod leave; @@ -60,13 +60,12 @@ mod skip; shuffle, current, play_next, - clear, + clear_queue, pause, save_playlist, playlists, lyrics )] -#[prefixes("m", "music")] pub struct Music; struct SongEndNotifier { diff --git a/src/commands/music/play_next.rs b/src/commands/music/play_next.rs index cecc74e..a775c5d 100644 --- a/src/commands/music/play_next.rs +++ b/src/commands/music/play_next.rs @@ -13,7 +13,7 @@ use crate::commands::music::{ #[description("Puts a song as the next to play in the queue")] #[usage("")] #[min_args(1)] -#[aliases("pn")] +#[aliases("pn", "play-next")] #[allowed_roles("DJ")] async fn play_next(ctx: &Context, msg: &Message, args: Args) -> CommandResult { let query = args.message();