Discord.py - Return an embed from a function

Viewed 133

When I return an embed from my function it return <discord.embeds.Embed object at 0x00000250B37841F0> when I try to send it from an another function (with await ctx.send(console_create()). Here's my code:

def console_create():
    embed=discord.Embed(title="```CONSOLE\n```", color=0xfd3030)
    embed.add_field(name="test", value="...")
    embed.set_footer(text="Ici s'affiche les messages d'erreurs...")
    return embed

I think I just forgot to add something obvious in the return's line......

1 Answers
await ctx.send(embed=console_create())

Tada. You just needed to specify where to pass the embed

Related