⏱️ Easy to use!
⚙️ Full configuration
📁 Support for all databases! (default is json)
🔄 Automatic restart after bot crash!
⏱️ Calling the module
const djsGiveaway = require("djs-giveaway");
const giveaway = new djsGiveaway(client);
Giveaway Options
new djsGiveaway(client, {
countdownUpdateInterval: 1000,
reaction: "🎁",
embed: {
color: "BLUE"
}
});
Giveaway Start
giveaway.create({
guildId: message.guild.id,
channelId: message.channel.id,
prize: "Test",
duration: 10000,
winnersCount: 1
});
For role-specific raffle
giveaway.create({
guildId: message.guild.id,
channelId: message.channel.id,
prize: "Test",
duration: 10000,
winnersCount: 1,
rolesToParticipate: ["roleId"]
});
Giveaway Edit
giveaway.edit(messageId, {prize: "Test v2", duration: 5000, winnersCount: 5});
Giveaway Delete
giveaway.delete(messageId);
⚙️ We did not say full configuration for nothing
{
"createEmbed": {
"title": "Giveaway",
"description": ":tada: Raffle started prize ",
"footer": "• {{winnersCount}} Winners"
},
"countdownEmbed": {
"title": "Giveaway",
"description": ":partying_face: Giveaway finish reaming time {{reaming}}.\n:gift: Prize: **{{prize}}**",
"footer": "• {{winnersCount}} Winners"
},
"finishEmbed": {
"title": ":tada: The draw is over",
"description": ":partying_face: Giveaway end.\n:military_medal: Winners {{winners}} won.\n:gift: Prize: **{{prize}}**",
"footer": ""
},
"winner": ":military_medal: Winners {{winners}} won.\n\n:gift: Prize: {{prize}}",
"noWinner": ":military_medal: Giveaway there was no winner.",
"controllers": {
"noRole": "You need {{roles}} roles to participate in the lottery."
}
}