Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Eg. I'm always frustrated when [...]
Editing a MessageEmbed requires you to pass an entire MessageEmbed to the .edit() function, which causes a giant amount of clutter if you're editing an Embed multiple times.
Describe the ideal solution
A clear and concise description of what you want to happen.
Instead of having to pass an entire MessageEmbed, add methods to the MessageEmbed class which return the Embed they're used on with the edits that you've made e.g. embed.editTitle('new title') , embed.editThumbnail(newurl)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
I fail to see the difference between embed.editTitle(...); and for example embed.setTitle(...); and such which are already methods. Not sure if you've overlooked these methods or if I'm overlooking something 馃槙
This is already a possibility with the library as-is
you can pass the received embed structure to the MessageEmbed constructor to use as template and then use the usual builder methods #setThumbnail #setTitle etc. to edit the embed to your liking.
// on top of your file
const { Discord } = require("discord.js");
// in a block below
const receivedEmbed = message.embeds[0];
const exampleEmbed = new Discord.MessageEmbed(receivedEmbed).setTitle('New title');
message.edit(exampleEmbed);
Passing to the constructor again is mandatory! if you just edit the received embed through <Message>.embeds[0].setTitle("foo") it will edit the cached embed on the original message, invalidating the cached structure which can lead to issues further down the line
For more information see: https://discordjs.guide/popular-topics/embeds.html#resending-and-editing
However it does indeed not become apparent that this is a possibility from reading the documentation alone, as the MessageEmbed constructor is currently not documented on https://discord.js.org/#/docs/main/stable/class/MessageEmbed
Most helpful comment
This is already a possibility with the library as-is
you can pass the received embed structure to the MessageEmbed constructor to use as template and then use the usual builder methods #setThumbnail #setTitle etc. to edit the embed to your liking.
Passing to the constructor again is mandatory! if you just edit the received embed through
<Message>.embeds[0].setTitle("foo")it will edit the cached embed on the original message, invalidating the cached structure which can lead to issues further down the lineFor more information see: https://discordjs.guide/popular-topics/embeds.html#resending-and-editing
However it does indeed not become apparent that this is a possibility from reading the documentation alone, as the MessageEmbed constructor is currently not documented on https://discord.js.org/#/docs/main/stable/class/MessageEmbed