Discord bot python Choice color in embed

Asked

Viewed 66 times

1

Hello, I’m having a problem, I try to choose a color, and it won’t, but already the title, Description will, someone can tell me the right one to do to pick the colors?

laranjavermelho = 0xFF4500
laranja = 0xFFA500
amarelo = 0xFFFF00
branco = 0xFFFAFA
brancofantasma = 0xF8F8FF

listacores = laranjavermelho, laranja, amarelo,branco, brancofantasma

@client.command(
    description="Crie embeds legais",
    brief="Crie Embed")
async def embed(ctx, title : str, description : str, cores : listacores):

    embed=discord.Embed(title=title, description=description, colour = cores)
    await ctx.send(embed=embed)
  • Most likely you want to do this: listacores = [laranjavermelho, laranja, amarelo,branco, brancofantasma]. (I have no experience with the Discord API).

  • didn’t work, but thanks

1 answer

1

I have some experience building bots in Discord in other languages (C# and JS). For "Embed Messages," from my experience with the Discord platform, I believe that only one color can be passed:

embed = discord.Embed(title=title, description=description, colour=cores[0])

I imagine that it does not receive several colors in the constructor of an "Embed Message", it is a behavior that I have never seen in Discord and in any other API.

I hope I’ve helped in some way.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.