Beta/commandes/autres/ping.py

10 lines
339 B
Python
Raw Normal View History

2026-02-06 22:23:20 +01:00
import discord
import time
async def execute(bot, params, message):
start = time.perf_counter()
temp_msg = await message.channel.send("Pong!")
end = time.perf_counter()
latency = round((end - start) * 1000) # ms
await temp_msg.edit(content=f"Pong! Latence : {latency}ms\nLatence API : {round(bot.latency * 1000)}ms")