Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.93k stars 3.77k forks source link

Message Embeds parameter #1048

Closed Werseter closed 6 years ago

Werseter commented 6 years ago

I am in process of migrating my bot from 0.16 async version to 1.0.0 rewrite. I've been using a custom wrapper to send embeds along the text messages. I've noticed that rewrite has embeds parameter available, but it doesn't seem to work.

await channel.send(msg, embed=embeds[0]) - this works correctly, as expected await channel.send(msg, embeds=embeds) - results in no message being sent.

SourSpoon commented 6 years ago

you need to give .send() an embed object to the kwarg embed. You can not send multiple embeds.

Embeds is not a valid kwarg.

These kind of questions are better suited to the discord.py discord server. https://discord.gg/r3sSKJJ

Werseter commented 6 years ago

According to rewrite api docs - this is a valid option.

Werseter commented 6 years ago
Ikusaba-san commented 6 years ago

embeds are for webhooks, not channels.

For the record, these are the docs for TextChannel.send: http://discordpy.readthedocs.io/en/rewrite/api.html#discord.TextChannel.send

Note that there is no mention of an embeds parameter.