mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-09 12:48:54 -05:00
[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:
parent
57240d25b9
commit
8739c04024
@ -49,11 +49,6 @@ class General:
|
|||||||
_("My sources say no"), _("Outlook not so good"), _("Very doubtful")
|
_("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()
|
@commands.command()
|
||||||
async def choose(self, ctx, *choices):
|
async def choose(self, ctx, *choices):
|
||||||
"""Chooses between multiple choices.
|
"""Chooses between multiple choices.
|
||||||
|
|||||||
@ -51,6 +51,14 @@ class Core:
|
|||||||
rpc.add_method('core', self.rpc_unload)
|
rpc.add_method('core', self.rpc_unload)
|
||||||
rpc.add_method('core', self.rpc_reload)
|
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()
|
@commands.command()
|
||||||
async def info(self, ctx: commands.Context):
|
async def info(self, ctx: commands.Context):
|
||||||
"""Shows info about Red"""
|
"""Shows info about Red"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user