From 8b2ccf363ac6894c21e256844948c8327645f0db Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sun, 17 Nov 2019 22:51:59 -0500 Subject: mostly fixed --- src/commands/sound_levels.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/commands/sound_levels.rs') diff --git a/src/commands/sound_levels.rs b/src/commands/sound_levels.rs index 81508a6..8add787 100644 --- a/src/commands/sound_levels.rs +++ b/src/commands/sound_levels.rs @@ -1,5 +1,15 @@ +use log::{ + error, + info, + trace, + warn, +}; use serenity::{ - framework::standard::Args, + framework::standard::{ + Args, + CommandResult, + macros::command, + }, model::channel::Message, prelude::*, }; @@ -14,7 +24,7 @@ use crate::{ pub const DEFAULT_VOLUME: f32 = 0.10; #[command] -pub fn mute(ctx: &mut Context, _: &Message, _: Args) -> Result<()> { +pub fn mute(ctx: &mut Context, _: &Message, _: Args) -> CommandResult { let mgr_lock = ctx.data.write().get::().cloned().unwrap(); let mut manager = mgr_lock.lock(); @@ -32,7 +42,7 @@ pub fn mute(ctx: &mut Context, _: &Message, _: Args) -> Result<()> { } #[command] -pub fn unmute(ctx: &mut Context, msg: &Message, _: Args) -> Result<()> { +pub fn unmute(ctx: &mut Context, msg: &Message, _: Args) -> CommandResult { let mgr_lock = ctx.data.write().get::().cloned().unwrap(); let mut manager = mgr_lock.lock(); @@ -51,7 +61,7 @@ pub fn unmute(ctx: &mut Context, msg: &Message, _: Args) -> Result<()> { } #[command] -pub fn volume(ctx: &mut Context, msg: &Message, mut args: Args) -> Result<()> { +pub fn volume(ctx: &mut Context, msg: &Message, mut args: Args) -> CommandResult { if args.len() == 0 { let vol = { let queue_lock = ctx.data.write().get::().cloned().unwrap(); -- cgit v1.3.1