1
0
mirror of https://gitlab.com/MisterBiggs/multi-bot-tutorial.git synced 2025-06-15 22:56:45 +00:00

added about function to discord bot

This commit is contained in:
Anson 2019-08-27 15:34:17 -07:00
parent d1b2f2a079
commit f9b622298e
2 changed files with 13 additions and 0 deletions

View File

@ -52,6 +52,18 @@ async def on_message(message):
embed.set_footer(text="Thanks Elon <3")
await message.channel.send(embed=embed)
elif message.content.startswith("/about"):
about_data = about()
embed = discord.Embed(
title="About",
url=about_data["blogPost"],
description=about_data["description"],
color=0xFF0000,
)
for func in about_data["functions"]:
embed.add_field(name=f"/{func[0]}", value=func[1], inline=True)
await message.channel.send(embed=embed)
client.run("TOKEN")

View File

@ -109,6 +109,7 @@ def about():
"Provides simple information about the Tesla Roadster launched into space by Elon Musk as a dummy payload to test the Falcon Heavy Rocket",
),
("launch", "Provides details on the next rocket launch happening."),
("about", "Gives information about the bot."),
],
"repo": "https://gitlab.com/MisterBiggs/multi-bot-tutorial",
"blogPost": "https://blog.ansonbiggs.com/",