Python discord-webhook

Viewed 185

I have an error with webhook and I would not know how to solve it, this is the error that appears:

'str' object has no attribute 'add embed'

This is the part of the code that gives me an error

embed = DiscordEmbed(title="fortnite", description=f'# [{namelol}] Il pacchetto [{pak["dynamicPakId"]}] è stato decriptato!\nTrovato {len(files)} Cosmetico.\nAes ➡️ {aes.lower()}.')
                                webhook.add_embed(embed)
                                response = webhook.execute()
1 Answers

Are you sure you put your webhook in? It should be:

webhook = DiscordWebhook(url='your webhook url')

Based on the error, your webhook is only a string. If you did the code above it should work properly. Skimming through the docs showed me this, if it still doesn't work let me know.

Related