Skip to content

HelloAward/award.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Award | Event Handler

Installation

npm install award.js --save yarn add award.js

const Award = require("award.js");

const awardClient = new Award({
	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
});

awardClient.on("ready", () => {
	console.log("Connected to Giftix, listening events...");
});

awardClient.on("boost", ({ user }) => {
	// You can give a role to the user.
	console.log(`${user.username} boosted our server!`);
});

awardClient.on("unboost", ({ user }) => {
	console.log(`${user.username} remove the boost from server. :(`);
});

awardClient.on("giveawayJoin", ({ user, giveaway }) => {
	console.log(`${user.username} joined the ${giveaway.title} giveaway.`);
});

awardClient.on("giveawayFinish", ({ giveaway, winners }) => {
	console.log(`${giveaway.title} has been ended. Winners: ${winners.map(_w => _w.id).join(",")}`);
});

awardClient.on("giveawayReroll", ({ giveaway, winners }) => {
	console.log(`${giveaway.title} has been rerolled. New Winners: ${winners.map(_w => _w.id).join(",")}`);
});

awardClient.on("giveawayDelete", ({ giveaway })  => {
	console.log(`${giveaway.title} has been deleted.`);
});

Developers


Swoth


clqu

⭐ Star

  • Don't forget to star this repo for support :)

About

AwardBot is an open source advanced giveaway bot. Written in Discord.js. You can set conditions for the giveaways, automatically deliver the prizes, and lock the giveaways.

Resources

License

Stars

6 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors