Files
aikaterna-cogs/pingtime/pingtime.py
Wyn 535975e41c Update pingtime.py
Unused import, remove pass context
2018-05-03 22:20:20 -04:00

17 lines
413 B
Python

from discord.ext import commands
class Pingtime:
def __init__(self, bot):
self.bot = bot
@commands.command()
async def pingtime(self, ctx):
"""Ping pong."""
latencies = self.bot.latencies
msg = "Pong!\n"
for shard, pingt in latencies:
msg += "Shard {}/{}: {}ms\n".format(shard + 1, len(latencies), round(pingt*1000))
await ctx.send(msg)