I want to automatically undeafen members in my server with a bot.
I know that I can unmute a member with
member.edit(mute = False) so I thought that I could use the following command:
member.edit(deaf = False) since
deaf is an attribute of
VoiceState just like
deaf but it doesn’t seem to work.
@commands.Cog.listener() async def on_voice_state_update(self, member, before, after): if after.mute: await member.edit(mute = False) if after.deaf: await member.edit(deaf = False)
The “mute” part works and the
if after.deaf: works too, so the problem is with
await member.edit(deaf = False).