diff options
Diffstat (limited to 'src/commands/today/mod.rs')
| -rw-r--r-- | src/commands/today/mod.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commands/today/mod.rs b/src/commands/today/mod.rs index 35059e5..e48983c 100644 --- a/src/commands/today/mod.rs +++ b/src/commands/today/mod.rs @@ -96,11 +96,18 @@ pub async fn today(ctx: PoiseContext<'_>, #[rest] _rest: Option<String>) -> anyh let play_args = options.choose(&mut thread_rng()); if let Some(play_args) = play_args { + let Some(voice_channel) = util::best_voice_channel(ctx) else { + tracing::error!(?ctx, "couldn't find a relevant voice channel"); + util::react(ctx, '🔇').await?; + + return Ok(()); + }; + let (_sb, call) = songbird(ctx).await?; let mut call = call.lock().await; if call.current_channel().is_none() { - call.join(CONFIG.discord.voice_channel()).await?; + call.join(voice_channel).await?; } let client = { |
