giveaways-discordjs
v2.0.2
Published
The Package for create your Giveaway in Discord
Downloads
2
Readme
Giveaways-DiscordJS
Create your Giveaway with this module !
GiveawaysManager
const { GiveawaysManager } = require('giveaways-discordjs');
const { Client, MessageEmbed } = require('discord.js');
const client = new Client({ intents: 32767 });
client.login("YOUR TOKEN");
client.on('ready', () => {
console.log(client.user.tag);
client.giveaways = new GiveawaysManager(client, { File: "./Giveaways.json", Interval: 1000 }); //Giveaways.json = []
});
GiveawaysManager#Start
const { GiveawaysManager } = require('giveaways-discordjs');
const { Client, MessageEmbed } = require('discord.js');
const client = new Client({ intents: 32767 });
client.login("YOUR TOKEN");
client.on('ready', () => {
console.log(client.user.tag);
client.giveaways = new GiveawaysManager(client, { File: "./Giveaways.json", Interval: 1000 }); //Giveaways.json = []
});
client.on('messageCreate', message => {
if(message.content === "gstart" && message.member.permissions.has("MANAGE_GUILD")) {
client.giveaways.start(message, {
Channel: message.channel,
Price: "YOUR PRICE",
WinnersCount: 1,
Duration: "7d",
Messages: {
StartGiveaway: new MessageEmbed().setColor("LUMINOUS_VIVID_PINK").setDescription(`:tada::tada: Giveaway :tada::tada:\nAuteur: {authorMention} \`{authorTag}\`\nPrix: {price}\nDébut: {startUnix}\nFin: {endUnix}\nGagnants: {winnersCount}`), //(No required) | Options Message: {authorName}/{authorTag}/{authorId}/{authorMention}/{startUnix}/{endUnix}/{price}/{winnersCount}
NoWinner: new MessageEmbed().setColor("RED").setDescription("Aucun gagnant n'a été trouvé!"), //(No required)
End: new MessageEmbed().setColor("RED").setDescription("Ce concours est maintenant fini!"), //(No required)
GiveawayEnd: new MessageEmbed().setColor("LUMINOUS_VIVID_PINK").setDescription(`:tada::tada: Giveaway Fini :tada::tada:\nAuteur: {authorMention} \`{authorTag}\`\nPrix: {price}\nDébut: {startUnix}\nFin: {endUnix}\nGagnants: {winners}`) //(No required) | Options Message: {authorName}/{authorTag}/{authorId}/{authorMention}/{startUnix}/{endUnix}/{price}/{winnersCount}/{winners}
},
/*
Buttons: {
Participe: { Label: "...", Emoji: "...", Style: "DANGER/SUCCESS/PRIMARY/SECONDARY..." }, (No required)
}
*/
});
};
});
GiveawaysManager#Find
const { GiveawaysManager } = require('giveaways-discordjs');
const { Client } = require('discord.js');
const client = new Client({ intents: 32767 });
client.login("YOUR TOKEN");
client.on('ready', () => {
console.log(client.user.tag);
client.giveaways = new GiveawaysManager(client, { File: "./Giveaways.json", Interval: 1000 }); //Giveaways.json = []
});
client.on('messageCreate', message => {
if(message.content === "gfind" && message.member.permissions.has("MANAGE_GUILD")) {
const giveawayData = client.giveaways.find(message, "YOUR GIVEAWAY ID");
console.log(giveawayData); //[] = GiveawayID not valid
};
});
GiveawaysManager#Delete
const { GiveawaysManager } = require('giveaways-discordjs');
const { Client } = require('discord.js');
const client = new Client({ intents: 32767 });
client.login("YOUR TOKEN");
client.on('ready', () => {
console.log(client.user.tag);
client.giveaways = new GiveawaysManager(client, { File: "./Giveaways.json", Interval: 1000 }); //Giveaways.json = []
});
client.on('messageCreate', message => {
if(message.content === "gdelete" && message.member.permissions.has("MANAGE_GUILD")) {
client.giveaways.delete(message, "YOUR GIVEAWAY ID");
};
});
GiveawaysManager#End
const { GiveawaysManager } = require('giveaways-discordjs');
const { Client } = require('discord.js');
const client = new Client({ intents: 32767 });
client.login("YOUR TOKEN");
client.on('ready', () => {
console.log(client.user.tag);
client.giveaways = new GiveawaysManager(client, { File: "./Giveaways.json", Interval: 1000 }); //Giveaways.json = []
});
client.on('messageCreate', message => {
if(message.content === "gend" && message.member.permissions.has("MANAGE_GUILD")) {
client.giveaways.end(message, "YOUR GIVEAWAY ID");
}
});
GiveawaysManager#Reroll
const { GiveawaysManager } = require('giveaways-discordjs');
const { Client } = require('discord.js');
const client = new Client({ intents: 32767 });
client.login("YOUR TOKEN");
client.on('ready', () => {
console.log(client.user.tag);
client.giveaways = new GiveawaysManager(client, { File: "./Giveaways.json", Interval: 1000 }); //Giveaways.json = []
});
client.on('messageCreate', message => {
if(message.content === "greroll" && message.member.permissions.has("MANAGE_GUILD")) {
client.giveaways.reroll(message, "YOUR GIVEAWAY ID");
};
});