mirror of
https://gitlab.com/ddorn/tfjm-discord-bot.git
synced 2024-12-27 10:22:23 +00:00
:spakles: ping cmd
This commit is contained in:
parent
5c522f07e3
commit
d792a87be3
@ -165,6 +165,15 @@ class MiscCog(Cog, name="Divers"):
|
|||||||
|
|
||||||
await ctx.send(f"{msg} {bonus}")
|
await ctx.send(f"{msg} {bonus}")
|
||||||
|
|
||||||
|
@command(aliases=["pong"])
|
||||||
|
async def ping(self, ctx):
|
||||||
|
"""Affiche la latence avec le bot."""
|
||||||
|
ping = time()
|
||||||
|
msg: discord.Message = await ctx.send("Pong !")
|
||||||
|
pong = time()
|
||||||
|
|
||||||
|
await msg.edit(content=f"Pong ! Ça a pris {int(1000 * (pong - ping))}ms")
|
||||||
|
|
||||||
# ---------------- Jokes ---------------- #
|
# ---------------- Jokes ---------------- #
|
||||||
|
|
||||||
def load_jokes(self) -> List[Joke]:
|
def load_jokes(self) -> List[Joke]:
|
||||||
|
Loading…
Reference in New Issue
Block a user