Files

25 lines
590 B
Python
Raw Permalink Normal View History

from redbot.core import commands
2018-05-03 17:21:47 -07:00
BaseCog = getattr(commands, "Cog", object)
class Pingtime(BaseCog):
"""🏓"""
async def red_delete_data_for_user(self, **kwargs):
""" Nothing to delete """
return
2018-05-03 17:21:47 -07:00
def __init__(self, bot):
self.bot = bot
@commands.command()
2018-05-03 17:21:47 -07:00
async def pingtime(self, ctx):
"""Ping pong."""
2018-05-03 17:40:10 -07:00
latencies = self.bot.latencies
2018-05-03 17:45:36 -07:00
msg = "Pong!\n"
2018-05-03 17:40:10 -07:00
for shard, pingt in latencies:
2018-08-08 21:54:06 -07:00
msg += "Shard {}/{}: {}ms\n".format(shard + 1, len(latencies), round(pingt * 1000))
2018-05-03 17:40:10 -07:00
await ctx.send(msg)