discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.36k stars 3.97k forks source link

Add ability to send single embeds “old way” (Backward Compatibility with v12) #6393

Closed Vista1nik closed 3 years ago

Vista1nik commented 3 years ago

Is your feature request related to a problem? Please describe. My bot have 100+ commands and every command have message.channel.send({embed: {/* embed here */}}).

After upgrade to discord.js v13, I need to replace every single message.channel.send to make embeds work again.

Describe the ideal solution I want to return old embed property to message.channel.send to enable backward compatibility with v12 code.

Describe alternatives you've considered

Additional context

DTrombett commented 3 years ago

This probably won't be readded. A reason can be that bots can send multiple embeds in a message so it can't be replaced removing possibility to send more than one embed. Adding the embed property (but keeping the embeds one) might cause problems, like if we use message.channel.send({ embed: embed1, embeds: [embed2, embed3] }). I don't really see a clear reason for this to be readded.

It's normal that updating to a totally new version means have a lot of breaking changes and requires to update your code.

nozsavsev commented 3 years ago

why cant you use function overloading like in C++ or there is no fnc overloading in js? it could solve all of your problems

vladfrangu commented 3 years ago

Please read this issue for more information. https://github.com/discordjs/discord.js/issues/5771

There is no function overload in JS 🙂

iCrawl commented 3 years ago

Won't happen.