[V3] Ping changes (#1618)

* moves ping to core commands
defaults ping behavior to reacting with a ping pong paddle with ball
adds an optional boolean flag to ping to get the avg latency from the bot
(strikes a middle ground with intended behavior from dev standpoint, and how users want it)

* casing for @Kowlin

* use correct check for permissions

* remove latency
This commit is contained in:
Michael H 2018-05-13 19:03:17 -04:00 committed by palmtree5
parent 57240d25b9
commit 8739c04024
2 changed files with 8 additions and 5 deletions

View File

@ -49,11 +49,6 @@ class General:
_("My sources say no"), _("Outlook not so good"), _("Very doubtful")
]
@commands.command(hidden=True)
async def ping(self, ctx):
"""Pong."""
await ctx.send("Pong.")
@commands.command()
async def choose(self, ctx, *choices):
"""Chooses between multiple choices.

View File

@ -51,6 +51,14 @@ class Core:
rpc.add_method('core', self.rpc_unload)
rpc.add_method('core', self.rpc_reload)
@commands.command(hidden=True)
async def ping(self, ctx):
"""Pong."""
if ctx.guild is None or ctx.channel.permissions_for(ctx.guild.me).add_reactions:
await ctx.message.add_reaction("\U0001f3d3") # ping pong paddle
else:
await ctx.maybe_send_embed("Pong.")
@commands.command()
async def info(self, ctx: commands.Context):
"""Shows info about Red"""