aboutsummaryrefslogtreecommitdiff
path: root/src/commands/sound_levels.rs
diff options
context:
space:
mode:
authorNathan Perry <np@nathanperry.dev>2019-11-17 22:51:59 -0500
committerNathan Perry <np@nathanperry.dev>2019-11-17 22:51:59 -0500
commit8b2ccf363ac6894c21e256844948c8327645f0db (patch)
treef6742f2d7905613b8c0404bba46e237f984a8da2 /src/commands/sound_levels.rs
parent2a38c282dd57c2051a568549d62c80d6036e8920 (diff)
mostly fixed
Diffstat (limited to 'src/commands/sound_levels.rs')
-rw-r--r--src/commands/sound_levels.rs18
1 files changed, 14 insertions, 4 deletions
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::<VoiceManager>().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::<VoiceManager>().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::<PlayQueue>().cloned().unwrap();