Advertisement
Niggle

Comando ping

Jun 11th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @client.event
  2. async def on_message(message):
  3.    if message.content.lower().startswith('a!ping'):
  4.        timep = time.time()
  5.        emb = discord.Embed(title='Aguarde', color=0x565656)
  6.        pingm0 = await client.send_message(message.channel, embed=emb)
  7.        ping = time.time() - timep
  8.        pingm1 = discord.Embed(title='Pong!', description=':ping_pong: Ping - %.01f segundos' % ping, color=0x00000)
  9.        await client.edit_message(pingm0, embed=pingm1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement