Androz2091 / discord-giveaways

🎉 Complete framework to facilitate the creation of giveaways using discord.js
https://discord-giveaways.js.org
MIT License
336 stars 127 forks source link

Custom giveaway end embed message #476

Open kenmadev opened 2 years ago

kenmadev commented 2 years ago

Is your feature request related to a problem? Please describe.

Right now when a giveaway ended, the main message where the main embed is created just replaces the content with Winners(s): [list of winners]. There's no way for it to be customizable. it's actually pretty redundant cause the list of winners is also being shown in the end message embed.

Related code https://github.com/Androz2091/discord-giveaways/blob/master/src/Manager.js#L122-L152

Describe the solution you'd like

I think there's should be a cleaner way to properly display an end message to the main embed rather than just printing out the formatted list of winners.

Describe alternatives you've considered

The GiveawayMessages prop under the GiveawayStartOptions from start method https://discord-giveaways.js.org/global.html#GiveawayMessages should accept a new parameter that modifies the mainEmbed.

If winMessage can accept MessageObject I believe a new parameter can also accept one.

Nico105 commented 2 years ago

We could change the winners message to include a variable like for winMessage so users can remove the whole thing if they want. I didn't really ever consider that users would want to remove it. Most of the times the winners were actually removed from the winMessage.

The "new" parameter you mentioned, would in this case be just a rename of the current winners eg winDescription: 'Winner(s): {winners]',

So now if you want you can adjust the whole thing.

Thoughts?

Tomato6966 commented 1 year ago

generally make all messages able to work via a function too.. so you can do things like

new Function("giveawayData", Winner${giveawayData.winners.length > 1 ? "s" : ""} ${giveawayData.winners});