I have been trying to make my webhook send an embed with some text along with an image as well, which I am using the discord_webhook library for. Unfortunately, every time I send the embed and the image, they come off as separate, even though I send them in the same execute call.
Here is my code:
webhook = DiscordWebhook(url=webhook_url, username="Test")
embed = DiscordEmbed()
embed.set_title("Test")
with open("Image.png", "rb") as f:
webhook.add_file(file=f.read(), filename="Image.png")
embed.add_embed_field(name="Text", value="Yay", inline=True)
webhook.add_embed(embed)
response = webhook.execute()
I tried using set_image but it didn’t work D:
Help would be appreciated 😀