From 16e660f5cd3787e587a5d082f57ab9d900aee0ca Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sat, 20 Jun 2020 16:17:05 -0400 Subject: move configuration into envconfig --- src/commands/playback.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/commands/playback.rs') diff --git a/src/commands/playback.rs b/src/commands/playback.rs index c11eac8..f80ec17 100644 --- a/src/commands/playback.rs +++ b/src/commands/playback.rs @@ -22,7 +22,7 @@ use crate::{ VoiceManager, }, Result, - TARGET_GUILD_ID, + CONFIG, util::CtxExt, commands::sound_levels::*, }; @@ -196,7 +196,7 @@ pub fn skip(ctx: &mut Context, _msg: &Message, _args: Args) -> Result<()> { let queue_lock = data.get::().cloned().unwrap(); - if let Some(handler) = manager.get_mut(*TARGET_GUILD_ID) { + if let Some(handler) = manager.get_mut(CONFIG.discord.guild()) { handler.stop(); let mut play_queue = queue_lock.write().unwrap(); play_queue.playing = None; @@ -226,7 +226,7 @@ pub fn die(ctx: &mut Context, msg: &Message, _: Args) -> Result<()> { play_queue.meme_queue.clear(); } - if let Some(handler) = manager.get_mut(*TARGET_GUILD_ID) { + if let Some(handler) = manager.get_mut(CONFIG.discord.guild()) { info!("killing playback"); handler.stop(); handler.leave(); -- cgit v1.3.1