aboutsummaryrefslogtreecommitdiff
path: root/src/commands/sound_levels.rs
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2020-06-20 16:17:05 -0400
committerNathan Perry <np@nathanperry.dev>2020-06-20 16:17:05 -0400
commit16e660f5cd3787e587a5d082f57ab9d900aee0ca (patch)
treeb6d67d820f2342f42f2dae00318f416d8a6142f9 /src/commands/sound_levels.rs
parent7cd17b04f7422dcce1410ec26922cba161cd6e0d (diff)
move configuration into envconfig
Diffstat (limited to 'src/commands/sound_levels.rs')
-rw-r--r--src/commands/sound_levels.rs6
1 files changed, 3 insertions, 3 deletions
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::<VoiceManager>().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::<VoiceManager>().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.")