首页 > 解决方案 > 使用 discord.py 查看用户是否在语音频道中交谈

问题描述

我想看看用户是否正在使用 discord.py 库说话。是否有我可以使用的功能或代码来做到这一点?也许是这样的:

@bot.event
async def on_talking_update(user, prev, cur):
    if cur.is_talking and prev.is_not_talking:
        print("the person is now talking")
    elif prev.is_talking and cur.is_not_talking:
        print("the person is done talking")

标签: pythondiscorddiscord.pybots

解决方案


您无法检测到是否有人在语音频道中讲话。您只能查看它们是否在语音频道中。


推荐阅读