blob: 4946f47469b47ce71841460ddf014ecc43a4037f (
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
|
use crate::{
commands::playback::songbird,
PoiseContext,
};
/// Mute audio (don't pause).
#[poise::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(())
}
/// Unmute audio.
#[poise::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(())
}
|