mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
backport: fix circular conversion when editing RichEmbed
This commit is contained in:
@@ -7,6 +7,7 @@ const Collection = require('../../util/Collection');
|
||||
const Util = require('../../util/Util');
|
||||
const resolvePermissions = require('../../structures/shared/resolvePermissions');
|
||||
|
||||
const RichEmbed = require('../../structures/RichEmbed');
|
||||
const User = require('../../structures/User');
|
||||
const GuildMember = require('../../structures/GuildMember');
|
||||
const Message = require('../../structures/Message');
|
||||
@@ -140,6 +141,8 @@ class RESTMethods {
|
||||
content = `${mention}${content ? `, ${content}` : ''}`;
|
||||
}
|
||||
|
||||
if (embed instanceof RichEmbed) embed = embed._apiTransform();
|
||||
|
||||
return this.rest.makeRequest('patch', Endpoints.Message(message), true, {
|
||||
content, embed,
|
||||
}).then(data => this.client.actions.MessageUpdate.handle(data).updated);
|
||||
|
||||
Reference in New Issue
Block a user