Skip to content

Releases: Androz2091/discord-giveaways

3.0.0

10 Jan 20:34
Compare
Choose a tag to compare

Creation of the GiveawaysManager and Giveaway classes

  • You must now create a new instance of the GiveawaysManager class with new parameters:
const client = new Discord.Client();
const { GiveawaysManager } = require('discord-giveaways');
const manager = new GiveawaysManager(client, options);
// So you don't need to use the launch() function anymore

Added

  • New default option to GiveawaysManager, to set some default values for new giveaways.
  • New pluralS option to startOptions.messages.units, to force removing the last character if the unit value is lower than 2.
  • New winnerCount option to rerollOptions, which allows you to choose the number of winners you want to reroll.
  • New exemptMembers option to startOptions, which allows you to filter members (for example to keep only members who have the Nitro Boost role).
  • New manager#end event, which allows you to implement custom features yourself (for example, you can now send a congratulatory message to winners).
  • Remaining time generation was improved.

Breaking changes

  • storage option doesn't require the __dirname+'/' prefix anymore.
  • winnersCount and newWinnersCount option were renamed to winnerCount and newWinnerCount.
  • ignoreIfHasPermission option was renamed to exemptPermissions.
  • giveaways.fetch() function was removed in favor of the manager.giveaways property.

New documentation

Discord Giveaways has now its official JsDoc documentation, you can find it here:
https://discord-giveaways.js.org