Question:
How do I create and send embeds with a discord bot?
Repl link:
code snippet
Question:
How do I create and send embeds with a discord bot?
Repl link:
code snippet
Embed can be a lot of things, what you want specifically?
Oh, like “stylishing” messages.
You can do something simple like:
embed = discord.Embed(title=title, description=description, color=0x00ff00)
await ctx.send(embed=embed)
In the case above I used the embed to stylish my /help command, the embed in my case will take the title, description and add a nice color.
@bot.command(help="Show all commands available")
async def commands(ctx):
title = "List of available commands:"
description = ""
for command in bot.commands:
if command.name != "help":
help_text = command.help or "No description"
description += f"\n**{command.name}**: {help_text}"
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.