original_docstring: Get the bot's current websocket and API latency.
docstring: Get the bot's current websocket and API latency.
docstring_tokens: Get the bot ' s current websocket and API latency .
code: async def ping(self, ctx):
          """Get the bot's current websocket and API latency."""
          start_time = time.time()
          message = await ctx.send(embed=nextcord.Embed(title="Testing Ping...", color=nextcord.Color.random()))
          end_time = time.time()
  
          await message.edit(embed=nextcord.Embed(
              title=f"Latency: {round(self.bot.latency * 1000)}ms\nAPI: {round((end_time - start_time) * 1000)}ms",
              color=nextcord.Color.random()))
code_tokens: async def ping ( self , ctx ) : start_time = time . time ( ) message = await ctx . send ( embed = nextcord . Embed ( title = "Testing Ping..." , color = nextcord . Color . random ( ) ) ) end_time = time . time ( ) await message . edit ( embed = nextcord . Embed ( title = f"Latency: {round(self.bot.latency * 1000)}ms\nAPI: {round((end_time - start_time) * 1000)}ms" , color = nextcord . Color . random ( ) ) )
short_docstring: Get the bot's current websocket and API latency.
short_docstring_tokens: Get the bot ' s current websocket and API latency .
comment: """Get the bot's current websocket and API latency."""