python - 使用 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")
解决方案
您无法检测到是否有人在语音频道中讲话。您只能查看它们是否在语音频道中。
推荐阅读
- python - 如何将特定列中的重复项替换为空值?
- spring - EmbeddedKafka 和 Spring Cloud Stream 无法正常工作
- sql - SQL JOIN 只有一个匹配
- angular - 实时 jwt 令牌过期管理
- javascript - 单击按钮时如何删除表中的数据?
- django - 为什么打印在 Geodjango 中显示 SRID 3847?
- git - Git不时消失
- reactjs - 可重用的 FlatList 组件 React Native 项目问题
- node.js - Nodejs程序运行但前端未显示在谷歌计算引擎的浏览器上
- python - 仅基于条件、groupby 和某些行,用以前的行值填充行