aboutsummaryrefslogtreecommitdiff
path: root/src/commands/today
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2024-08-16 22:35:46 -0400
committerNathan Perry <np@nathanperry.dev>2024-08-16 22:35:47 -0400
commite0a9b18f45858829f88cbe20611aaf696fc5bf6a (patch)
treebaef5abb258a7857fabb3f084627acd9a469677f /src/commands/today
parentef056edf92b678265a4666e1f9405e3b0ce66a42 (diff)
restore support for volume commands
Diffstat (limited to 'src/commands/today')
-rw-r--r--src/commands/today/mod.rs7
1 files changed, 5 insertions, 2 deletions
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<String>) -> 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<String>) -> anyh
let input =
YoutubeDl::new_ytdl_like("yt-dlp", client.clone(), play_args.url.conv::<String>());
- 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()?;