python-discord-webhook icon indicating copy to clipboard operation
python-discord-webhook copied to clipboard

AttributeError: 'DiscordEmbed' object has no attribute 'add_field'

Open iestatic opened this issue 3 years ago • 1 comments

AttributeError: 'DiscordEmbed' object has no attribute 'add_field'

This doesn't allow the add_field feature for the discord embeds.

iestatic avatar Jul 07 '22 21:07 iestatic

Hey,

The method name is add_embed_field, not add_field.

Example code:

from discord_webhook import DiscordEmbed

embed = DiscordEmbed()
embed.add_embed_field(name='My field', value='Hello world')

I hope this helps.

vremes avatar Jul 13 '22 02:07 vremes