mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Message embeds (#1529)
* wowe * fix sending * Update MessageEmbed.js * lel * patched some fields for message embed and transforms edits as well * webhook embeds transform * apply transform to webhook embeds, and changed references * Update MessageEmbed.js * Update ClientDataResolver.js * updated embeds params and use new util resolvers * did not mean to add this back * use master version of ClientDataResolver * transform no longer needed
This commit is contained in:
@@ -91,7 +91,7 @@ class Message {
|
||||
* A list of embeds in the message - e.g. YouTube Player
|
||||
* @type {MessageEmbed[]}
|
||||
*/
|
||||
this.embeds = data.embeds.map(e => new Embed(this, e));
|
||||
this.embeds = data.embeds.map(e => new Embed(e));
|
||||
|
||||
/**
|
||||
* A collection of attachments in the message - e.g. Pictures - mapped by their ID
|
||||
@@ -163,7 +163,7 @@ class Message {
|
||||
if ('content' in data) this.content = data.content;
|
||||
if ('pinned' in data) this.pinned = data.pinned;
|
||||
if ('tts' in data) this.tts = data.tts;
|
||||
if ('embeds' in data) this.embeds = data.embeds.map(e => new Embed(this, e));
|
||||
if ('embeds' in data) this.embeds = data.embeds.map(e => new Embed(e));
|
||||
else this.embeds = this.embeds.slice();
|
||||
|
||||
if ('attachments' in data) {
|
||||
|
||||
Reference in New Issue
Block a user