From e4dbcfde7ad23fb80c208e6eaf55eb10e554690d Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 22 Apr 2026 00:39:10 -0400 Subject: [PATCH] ping: always show round-trip time instead of only when >500ms Co-Authored-By: Claude Sonnet 4.6 --- matrixbot/commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/matrixbot/commands.py b/matrixbot/commands.py index 21f4fa1..93847a0 100644 --- a/matrixbot/commands.py +++ b/matrixbot/commands.py @@ -137,11 +137,9 @@ async def cmd_help(client: AsyncClient, room_id: str, sender: str, args: str): @command("ping", "Check bot latency") async def cmd_ping(client: AsyncClient, room_id: str, sender: str, args: str): start = time.monotonic() - _ = await send_text(client, room_id, "Pong!") + await send_text(client, room_id, "Pong!") elapsed = (time.monotonic() - start) * 1000 - # Edit isn't straightforward in Matrix, so just send a follow-up if slow - if elapsed > 500: - await send_text(client, room_id, f"(round-trip: {elapsed:.0f}ms)") + await send_text(client, room_id, f"round-trip: {elapsed:.0f}ms")