[Python] Discord.py: Change embed color

Discussão em 'Python' iniciado por Stack, Maio 21, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using a script to post, from one server to another, a Discord Embed.

    I need to change the colour of the forwarded Embed (output).

    I tried already a lot of methods like embed = discord.Embed(color=0xd10a07).

    Code


    In this part of the code you also change the footer etc., so I assume I have to set the embed colour there, too.

    if message.channel.id in channels_forward_embed:
    dest_channel_id = channels_forward_embed[message.channel.id]

    if message.embeds:
    embed = message.embeds[0]
    # change colour of embed
    embed.set_footer(text="TEST | TEST", icon_url="pictureurl")
    else:
    return

    try:
    await self.cog.send_embed(dest_channel_id, embed)
    except:
    print('Error sending embed')


    How to change the colour of a given Embed?

    Continue reading...

Compartilhe esta Página