0.0.1 • Published 2 years ago

award-api v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Award | Event Handler

Installation

npm install award-api

Example

const Award = require("award-api");

const awardClient = new Award({ guild: "SERVER_ID", 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 Award"); });

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

0.0.1

2 years ago

1.0.0

2 years ago

1.0.1

2 years ago