mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat(RichEmbed): add toJSON returning an api-compatible object
This backports:
PR: https://github.com/discordjs/discord.js/pull/3813
Commit: 4ec01ddef5
This commit is contained in:
@@ -152,7 +152,7 @@ class RESTMethods {
|
||||
content = `${mention}${content ? `, ${content}` : ''}`;
|
||||
}
|
||||
|
||||
if (embed instanceof RichEmbed) embed = embed._apiTransform();
|
||||
if (embed instanceof RichEmbed) embed = embed.toJSON();
|
||||
|
||||
return this.rest.makeRequest('patch', Endpoints.Message(message), true, {
|
||||
content, embed, flags,
|
||||
|
||||
Reference in New Issue
Block a user