From 70af399719526675ce67a12259335a3f3da6e56f Mon Sep 17 00:00:00 2001 From: sgoudham Date: Thu, 23 Jul 2020 10:51:40 +0100 Subject: [PATCH] Moving ping command back into main.py Adding prefix command description --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e321b304..8713dfbf 100644 --- a/main.py +++ b/main.py @@ -151,11 +151,18 @@ async def on_ready(): print('Bot is ready.') -# Bot prefix command that returns the prefix or updates it +@client.command(name="ping", aliases=["Ping"]) +async def _ping(ctx): + """Sends the latency of the bot (ms)""" + await ctx.send(f'Pong! `{round(client.latency * 1000)}ms`') + + @client.command(name="prefix", aliases=["Prefix"]) @guild_only() @has_permissions(manage_guild=True) async def change_prefix(ctx, new: Optional[str]): + """View/Change Guild Prefix""" + # As long as a new prefix has been given and is less than 5 characters if new and len(new) < 5: if len(new) > 1: