mirror of
https://gitlab.com/MisterBiggs/multi-bot-tutorial.git
synced 2025-06-16 07:06:51 +00:00
added about function to discord bot
This commit is contained in:
parent
d1b2f2a079
commit
f9b622298e
@ -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")
|
||||
|
||||
|
@ -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/",
|
||||
|
Loading…
x
Reference in New Issue
Block a user