I’m trying to send a list of embeds in a single message using discord.py. According to the documentation, I should use the send()
function with the embeds
parameter:
send(content=None, *, wait=False, username=None, avatar_url=None, tts=False, file=None, files=None, embed=None, **embeds=None**)
embeds (List[Embed]) – A list of embeds to send with the content. Maximum of 10. This cannot be mixed with the embed parameter.
However, I get the error message TypeError: send() got an unexpected keyword argument 'embeds'
when I try to pass the embeds
parameter to the send()
function.
I need these embeds in the same message because I want to replace them with a different list of embeds if the user adds a reaction. Here’s my code:
embedList = []
for monster in monsters:
embed = discord.Embed(color= 0x202225)
embed.set_author(name=monster['name'], icon_url="https://ochabot.co/sprites/16/" + str(monster["family"]) + "_" + str(monster["species"]) + "_discord.png")
embedList.append(embed)
if(len(embedList) == 10):
await message.channel.send(embeds=embedList)
embedList = []
This code should send a single message containing 10 embeds every ten monsters, but instead I’m getting the error mentioned above. I’m new to Python so I might have just made a mistake.