blob: 9a6cfc67025cbf6bebccc86f6b8b489d6b1e0d55 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use crate::{
commands::playback::songbird,
PoiseContext,
};
pub const DEFAULT_VOLUME: f32 = 0.20;
const MAX_VOLUME: f32 = 5.0;
#[poise::command(slash_command, prefix_command, guild_only)]
pub async fn mute(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
let (_sb, call) = songbird(ctx).await?;
let mut call = call.lock().await;
call.mute(true).await?;
Ok(())
}
#[poise::command(slash_command, prefix_command, guild_only)]
pub async fn unmute(ctx: PoiseContext<'_>) -> anyhow::Result<()> {
let (_sb, call) = songbird(ctx).await?;
let mut call = call.lock().await;
call.mute(true).await?;
Ok(())
}
|