Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): document and support embeds field in message create endpoint #5792

Merged
merged 14 commits into from
Jun 11, 2021
Prev Previous commit
fix(ApiMessage): fix eslint errs
adrifcastr committed Jun 11, 2021
commit 46383da59efe53f9ee36fac845313eba0d3d72ca
4 changes: 1 addition & 3 deletions src/structures/APIMessage.js
Original file line number Diff line number Diff line change
@@ -147,8 +147,6 @@ class APIMessage {
embedLikes.push(...this.options.embeds);
}

const embeds = embedLikes.map(e => new MessageEmbed(e).toJSON());

const components = this.options.components?.map(c =>
BaseMessageComponent.create(
Array.isArray(c) ? { type: MessageComponentTypes.ACTION_ROW, components: c } : c,
@@ -217,7 +215,7 @@ class APIMessage {
*/
async resolveFiles() {
if (this.files) return this;

const embedLikes = [];

if (this.options.embeds) {