2018-08-19 20:23:44 -07:00
|
|
|
from redbot.core import commands
|
2018-05-03 17:21:47 -07:00
|
|
|
|
|
|
|
|
|
2018-10-06 12:06:54 -07:00
|
|
|
BaseCog = getattr(commands, "Cog", object)
|
|
|
|
|
|
2020-08-26 17:57:43 +01:00
|
|
|
|
2018-10-06 12:06:54 -07:00
|
|
|
class Pingtime(BaseCog):
|
2018-08-19 20:23:44 -07:00
|
|
|
"""🏓"""
|
2020-08-26 17:57:43 +01:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
2018-05-03 22:20:20 -04:00
|
|
|
@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)
|