Add latency command
This commit is contained in:
parent
c998ced71a
commit
97d68569e0
1 changed files with 9 additions and 0 deletions
9
app/modules/latency.py
Normal file
9
app/modules/latency.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import niobot
|
||||
|
||||
|
||||
class LatencyModule(niobot.Module):
|
||||
@niobot.command("latency")
|
||||
async def latency(self, ctx: niobot.Context):
|
||||
"""See the bot's latency."""
|
||||
latency = ctx.latency
|
||||
return await ctx.respond("Latency: {:.2f}ms".format(latency * 1000))
|
Loading…
Reference in a new issue