2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 06:26:04 +00:00

add ip and ping

This commit is contained in:
Nick80835
2020-05-02 16:43:52 -04:00
parent 5cd6321ca5
commit 917aedebe9
2 changed files with 42 additions and 0 deletions

View File

@@ -48,6 +48,14 @@ async def shutdown(event):
await micro_bot.stop_client()
@ldr.add(pattern="ping")
async def ping(event):
start = time_ns()
ping_msg = await event.reply("`Ping…`")
time_taken_ms = (time_ns() - start) / 1000000
await ping_msg.edit(f"`Ping… Pong! -> `**{time_taken_ms}**`ms`")
@ldr.add(pattern="repo")
async def bot_repo(event):
await event.reply("https://github.com/Nick80835/microbot")