T
T
TanderOFF2021-07-21 15:16:06
Python
TanderOFF, 2021-07-21 15:16:06

How to check if the participant has turned off the microphone?

Hello, how can I tell if a participant has turned off the microphone or not?

@client.event
async def on_voice_state_update(member, before, after):
    if before.channel is None and after.channel is not None:
    #Вот тут проверить микрофон

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2021-07-21
@TanderOFF

after.self_deaf/ after.self_mute
https://discordpy.readthedocs.io/en/stable/api.htm...

V
Vindicar, 2021-07-21
@Vindicar

Read documentation .

class discord.VoiceState
Represents a Discord user's voice state.
deaf
bool - Indicates if the user is currently deafened by the guild.
mute
bool - Indicates if the user is currently muted by the guild.
self_mute
bool - Indicates if the user is currently muted by their own accord.
self_deaf
bool - Indicates if the user is currently deafened by their own accord.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question