我们可以使用 Discord.py 重写获取 Discord 用户的延迟 (ping) 吗?
Can we fetch the Latency (ping) of a Discord user using Discord.py rewrite?
在 discord.py 文档中,我们有一个方法 client.latency
return Bot 的延迟
但实际上我问的是我们是否可以像这样检查其他用户的延迟
User: sd!ping @Mention
Bot: XXms is the Ping of @Mention
这是默认的 ping 命令,
这 Return 机器人的延迟
@client.command()
async def ping(ctx):
await ctx.send(f'{round(client.latency * 1000)}ms')
有没有像Mention.latency
这样的方法Return提到的用户的延迟
If it is Not Possible till now, please Let me know... Thanks in Advance !
Discord 目前只允许您查看自己的延迟。此功能不太可能实现,因为即使是普通用户也无法在语音通道中看到其他人的延迟。
您可以尝试使用网站并从中获取延迟并将其发送给机器人以供使用。您可能需要为此使用 Flask/Django 或 express.js。
在 discord.py 文档中,我们有一个方法 client.latency
return Bot 的延迟
但实际上我问的是我们是否可以像这样检查其他用户的延迟
User: sd!ping @Mention
Bot: XXms is the Ping of @Mention
这是默认的 ping 命令, 这 Return 机器人的延迟
@client.command()
async def ping(ctx):
await ctx.send(f'{round(client.latency * 1000)}ms')
有没有像Mention.latency
这样的方法Return提到的用户的延迟
If it is Not Possible till now, please Let me know... Thanks in Advance !
Discord 目前只允许您查看自己的延迟。此功能不太可能实现,因为即使是普通用户也无法在语音通道中看到其他人的延迟。
您可以尝试使用网站并从中获取延迟并将其发送给机器人以供使用。您可能需要为此使用 Flask/Django 或 express.js。