Second commit

This commit is contained in:
Sid 2021-12-18 18:19:54 +01:00 committed by GitHub
parent 4eb1ab4ec4
commit 8d4e8a6c82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -7,7 +7,7 @@
> Bot responds with "Hello!"
>**!ping**
> Bot responds with "Pong!" and botlatency
> Bot responds with "Pong!" and botlatency + a gif from Ping Pong The Animation
>**!github**
> Flexes github link

View file

@ -25,9 +25,10 @@ async def on_message(message):
if message.content.lower().startswith('!hello'):
await message.channel.send('Hello!')
# user sends "!ping", bot responds w/ "Pong" + bot latency
# user sends "!ping", bot responds w/ "Pong" + bot latency and a gif
elif message.content.lower().startswith('!ping'):
await message.channel.send(f'Pong :ping_pong: (Bot latency: **{round(client.latency * 1000)}ms**)')
await message.channel.send(file=discord.File('resources/pingpong.gif'))
# user sends "!help", bot sends commands file
elif message.content.lower().startswith("!help"):
@ -47,4 +48,4 @@ async def on_message(message):
# run bot
client.run(my_secret)
client.run(my_secret)

BIN
resources/pingpong.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB