From e0a9b18f45858829f88cbe20611aaf696fc5bf6a Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Fri, 16 Aug 2024 22:35:46 -0400 Subject: restore support for volume commands --- src/commands/today/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/commands/today') diff --git a/src/commands/today/mod.rs b/src/commands/today/mod.rs index e48983c..f8f38c7 100644 --- a/src/commands/today/mod.rs +++ b/src/commands/today/mod.rs @@ -13,7 +13,6 @@ use crate::{ commands::playback::songbird, util, PoiseContext, - CONFIG, }; mod prelude; @@ -103,6 +102,9 @@ pub async fn today(ctx: PoiseContext<'_>, #[rest] _rest: Option) -> anyh return Ok(()); }; + let volume = util::volume(ctx).await; + tracing::debug!(volume); + let (_sb, call) = songbird(ctx).await?; let mut call = call.lock().await; @@ -118,7 +120,8 @@ pub async fn today(ctx: PoiseContext<'_>, #[rest] _rest: Option) -> anyh let input = YoutubeDl::new_ytdl_like("yt-dlp", client.clone(), play_args.url.conv::()); - call.enqueue_input(input.into()).await; + let handle = call.enqueue_input(input.into()).await; + handle.set_volume(volume as _)?; let q = call.queue(); q.pause()?; -- cgit v1.3.1