📜  延迟 discord.py - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.784000             🧑  作者: Mango

代码示例1
@client.command()
async def ping(ctx):
    before = time.monotonic()
    message = await ctx.send("Pong!")
    ping = (time.monotonic() - before) * 1000
    await message.edit(content=f"Pong!  `{int(ping)}ms`")
    
    #for discord.py rewrite