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/sound_levels.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/commands/sound_levels.rs') diff --git a/src/commands/sound_levels.rs b/src/commands/sound_levels.rs index 648e54b..ab98806 100644 --- a/src/commands/sound_levels.rs +++ b/src/commands/sound_levels.rs @@ -15,8 +15,8 @@ use serenity::{ use crate::{ Result, + CONFIG, audio::{PlayQueue, VoiceManager}, - TARGET_GUILD_ID, util::CtxExt, }; @@ -27,7 +27,7 @@ pub fn mute(ctx: &mut Context, _: &Message, _: Args) -> Result<()> { let mgr_lock = ctx.data.write().get::().cloned().unwrap(); let mut manager = mgr_lock.lock(); - manager.get_mut(*TARGET_GUILD_ID) + manager.get_mut(CONFIG.discord.guild()) .map(|handler| { if handler.self_mute { trace!("Already muted.") @@ -45,7 +45,7 @@ pub fn unmute(ctx: &mut Context, msg: &Message, _: Args) -> Result<()> { let mgr_lock = ctx.data.write().get::().cloned().unwrap(); let mut manager = mgr_lock.lock(); - manager.get_mut(*TARGET_GUILD_ID) + manager.get_mut(CONFIG.discord.guild()) .map(|handler| { if !handler.self_mute { trace!("Already unmuted.") -- cgit v1.3.1