diff options
| author | Nathan Perry <np@nathanperry.dev> | 2020-06-20 16:17:05 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2020-06-20 16:17:05 -0400 |
| commit | 16e660f5cd3787e587a5d082f57ab9d900aee0ca (patch) | |
| tree | b6d67d820f2342f42f2dae00318f416d8a6142f9 /src/commands/playback.rs | |
| parent | 7cd17b04f7422dcce1410ec26922cba161cd6e0d (diff) | |
move configuration into envconfig
Diffstat (limited to 'src/commands/playback.rs')
| -rw-r--r-- | src/commands/playback.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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::<PlayQueue>().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(); |
