diff --git a/docker-compose.yml b/docker-compose.yml index 317fbd0..f497a72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,7 +25,6 @@ services: - ${DATA_DIR_PATH:-~/data}:/data depends_on: - postgres - - redis networks: - frontend - backend diff --git a/src/bot/commands/audio/pause.rs b/src/bot/commands/audio/pause.rs index a3ba074..cf566a2 100644 --- a/src/bot/commands/audio/pause.rs +++ b/src/bot/commands/audio/pause.rs @@ -3,11 +3,11 @@ use serenity::{ prelude::*, }; -use super::{get_songbird, create_response, edit_response}; +use super::{create_response, edit_response, get_songbird, process_message}; pub async fn run(ctx: &Context, command: &CommandInteraction) { // Create the initial response - create_response(&ctx, &command, format!(".....")).await; + process_message(&ctx, &command).await; // Get the songbird manager let manager = get_songbird(ctx).await; diff --git a/src/bot/commands/audio/play.rs b/src/bot/commands/audio/play.rs index 6d1778f..83f2729 100644 --- a/src/bot/commands/audio/play.rs +++ b/src/bot/commands/audio/play.rs @@ -73,7 +73,7 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) { }; } Err(err) => { - log::warn!("{}", err); + log::warn!("<{guild_id}> Failed to join voice channel: {}", err); edit_response(&ctx, &command, format!("{}", err)).await; } } @@ -93,7 +93,7 @@ pub async fn enqueue_track( let valid = is_valid_url(&track_url); // Check if the URL is valid if !valid.0 { - log::warn!("Invalid track url: {}", track_url); + log::warn!("<{guild_id}> Invalid track url: {}", track_url); return Err(SirenError::new( 422, format!("Invalid track url: {}", track_url), @@ -105,7 +105,7 @@ pub async fn enqueue_track( playlist_items = match get_playlist_urls(&track_url) { Ok(items) => items, Err(err) => { - log::warn!("Failed to get playlist urls: {}", err); + log::warn!("<{guild_id}> Failed to get playlist urls: {}", err); return Err(SirenError::new(422, err.to_string())); } }; @@ -134,7 +134,7 @@ pub async fn enqueue_track( let metadata = match input.aux_metadata().await { Ok(metadata) => metadata, Err(err) => { - log::warn!("Failed to get metadata for track: {err}"); + log::warn!("<{guild_id}> Failed to get metadata for track: {err}"); let _ = leave_voice_channel(&manager, &guild_id).await; return Err(SirenError::new(422, err.to_string())); } diff --git a/src/bot/commands/audio/resume.rs b/src/bot/commands/audio/resume.rs index 49a4d7b..5b6a1e4 100644 --- a/src/bot/commands/audio/resume.rs +++ b/src/bot/commands/audio/resume.rs @@ -3,11 +3,11 @@ use serenity::{ prelude::*, }; -use super::{get_songbird, create_response, edit_response}; +use super::{create_response, edit_response, get_songbird, process_message}; pub async fn run(ctx: &Context, command: &CommandInteraction) { // Create the initial response - create_response(&ctx, &command, format!(".....")).await; + process_message(&ctx, &command).await; // Get the songbird manager let manager = get_songbird(ctx).await; diff --git a/src/bot/commands/audio/skip.rs b/src/bot/commands/audio/skip.rs index 4a07f7e..5ac5337 100644 --- a/src/bot/commands/audio/skip.rs +++ b/src/bot/commands/audio/skip.rs @@ -7,7 +7,7 @@ use super::{get_songbird, create_response, edit_response}; pub async fn run(ctx: &Context, command: &CommandInteraction) { // Create the initial response - create_response(&ctx, &command, format!(".....")).await; + process_message(&ctx, &command).await; // Get the songbird manager let manager = get_songbird(ctx).await; diff --git a/src/bot/commands/audio/stop.rs b/src/bot/commands/audio/stop.rs index b50c610..71b08a2 100644 --- a/src/bot/commands/audio/stop.rs +++ b/src/bot/commands/audio/stop.rs @@ -7,7 +7,7 @@ use super::{get_songbird, create_response, edit_response}; pub async fn run(ctx: &Context, command: &CommandInteraction) { // Create the initial response - create_response(&ctx, &command, format!(".....")).await; + process_message(&ctx, &command).await; // Get the songbird manager let manager = get_songbird(ctx).await; diff --git a/src/bot/commands/audio/volume.rs b/src/bot/commands/audio/volume.rs index 184cd3d..774364c 100644 --- a/src/bot/commands/audio/volume.rs +++ b/src/bot/commands/audio/volume.rs @@ -9,7 +9,7 @@ use songbird::Songbird; use crate::data::guilds::GuildCache; -use super::{get_songbird, create_response, edit_response}; +use super::{create_response, edit_response, get_songbird, process_message}; pub async fn run(ctx: &Context, command: &CommandInteraction) { // Process the command options @@ -26,7 +26,7 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) { }; // Create the initial response - create_response(&ctx, &command, ".....".to_string()).await; + process_message(&ctx, &command).await; // Get the songbird manager let manager = get_songbird(ctx).await; @@ -47,10 +47,11 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) { // Set the volume set_volume(&manager, guild_id, volume).await; + log::debug!("<{guild_id}> Setting the volume to {}", volume); edit_response( &ctx, &command, - format!("<{guild_id}> Setting the volume to {}", volume), + format!("Setting the volume to {}", volume), ) .await; }