Socket
Socket
Sign inDemoInstall

giftix

Package Overview
Dependencies
4
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    giftix

Event Handler | By creating advanced giveaways with Giftix, you can improve your social media accounts and gain organic lift!


Version published
Weekly downloads
5
increased by400%
Maintainers
2
Install size
151 kB
Created
Weekly downloads
 

Readme

Source

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.`);
});

Keywords

FAQs

Last updated on 02 Jan 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc