diff --git a/cogs/utils.py b/cogs/utils.py index 98a267e..30348c0 100644 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -41,6 +41,18 @@ async def echo(self, ctx: ApplicationContext, text: str): await ctx.respond("Echoed!", ephemeral=True) await ctx.channel.send(text) + @commands.slash_command( + name="ping", + description="Get the server latency." + ) + async def ping(self, ctx: ApplicationContext): + localembed = discord.Embed( + title=":ping_pong: Pong!", + description=f"Current server latency is **{round(self.bot.latency * 1000, 2)} ms**.", + color=discord.Color.random() + ) + await ctx.respond(embed=localembed) + @commands.slash_command( name="repo", description="Shows the open-source code links for isobot."