giftix
Event Handler | By creating advanced giveaways with Giftix, you can improve your social media accounts and gain organic lift!
Giftix | Event Handler
Installation
npm install giftix --save
yarn add giftix
const Giftix = require("giftix");
const giftixClient = new Giftix({
guild: "911264853086318702", // Server ID to listen to events
intents: [
"BOOST",
"UNBOOST",
"GIVEAWAY_JOIN",
"GIVEAWAY_FINISH",
"GIVEAWAY_REROLL",
"GIVEAWAY_CREATE",
] // Join our Discord server to intents list and event names
});
giftixClient.on("ready", () => {
console.log("Connected to Giftix, listening events...");
});
giftixClient.on("boost", ({ user }) => {
// You can give a role to the user.
console.log(`${user.username} boosted our server!`);
});
giftixClient.on("unboost", ({ user }) => {
console.log(`${user.username} remove the boost from server. :(`);
});
giftixClient.on("giveawayJoin", ({ user, giveaway }) => {
console.log(`${user.username} joined the ${giveaway.title} giveaway.`);
});
giftixClient.on("giveawayFinish", ({ giveaway, winners }) => {
console.log(`${giveaway.title} has been ended. Winners: ${winners.map(_w => _w.id).join(",")}`);
});
giftixClient.on("giveawayReroll", ({ giveaway, winners }) => {
console.log(`${giveaway.title} has been rerolled. New Winners: ${winners.map(_w => _w.id).join(",")}`);
});
giftixClient.on("giveawayDelete", ({ giveaway }) => {
console.log(`${giveaway.title} has been deleted.`);
});