nonsensebot/app/modules/latency.py

10 lines
271 B
Python
Raw Normal View History

2024-08-03 01:27:44 +01:00
import niobot
class LatencyModule(niobot.Module):
@niobot.command("latency")
async def latency(self, ctx: niobot.Context):
"""See the bot's latency."""
latency = ctx.latency
2024-08-03 02:16:38 +01:00
return await ctx.respond("Latency: {:,.2f}ms".format(latency))