Python 3.x 需要帮助制作一个discord.py重写bot,该服务器使语音频道中的每个人都静音吗

Python 3.x 需要帮助制作一个discord.py重写bot,该服务器使语音频道中的每个人都静音吗,python-3.x,discord.py-rewrite,Python 3.x,Discord.py Rewrite,我做了一些研究,得出了这个结论 @client.command(aliases=['tmall']) async def toggle_mute_all(ctx, channel: discord.VoiceChannel): members = channel.members for i in range(len(members)): await members[i].edit(mute=True) 它不起作用,我甚至没有收到错误回复。我还想检查成员是否已静音

我做了一些研究,得出了这个结论

@client.command(aliases=['tmall'])
async def toggle_mute_all(ctx, channel: discord.VoiceChannel):
    members = channel.members
    for i in range(len(members)):
        await members[i].edit(mute=True)

它不起作用,我甚至没有收到错误回复。我还想检查成员是否已静音,如果已静音,请取消静音。

是否已启用成员意图@PatrickHaugh我不知道,现在可以了,谢谢。但是如何检查成员是否已禁用?检查
member.voice.mute
member.voice.self\u mute