npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hiratanagis/awardify

v0.0.7

Published

A Advance Discord Giveaway System

Readme

@hiratanagis/awardify

Advanced discord giveaways system with Support for Slash/Message commands and Discord Button interactions.

Installation

npm i @hiratanagis/awardify
------ or ---------------------
yarn add @hiratanagis/awardify
------ or ---------------------
pnpm add @hiratanagis/awardify

Button Support Documentation

awardify natively supports Discord Buttons (ButtonBuilder) instead of traditional emoji reactions for giveaway registration. This provides a cleaner and more interactive user experience.

Buttons Configuration Schema

When starting a giveaway or defining default settings in GiveawaysManagerOptions, you can supply a buttons object inside the default settings or GiveawayStartOptions:

| Property | Type | Description | |---|---|---| | join | ButtonBuilder | Required. The button displayed to join the giveaway. | | leave | ButtonBuilder | Optional. The button displayed to leave the giveaway (typically sent ephemerally when a user tries to rejoin). | | participants | ButtonBuilder | Optional. The button displayed to view participants next to the join button. | | joinReply | string | MessageObject | Optional. Ephemeral message content or object sent to the user upon joining. | | leaveReply | string | MessageObject | Optional. Ephemeral message content or object sent to the user upon leaving. |

Quick Start Example

Here is how you can configure and initialize the GiveawaysManager with buttons in your bot:

const { Client, GatewayIntentBits, ButtonBuilder, ButtonStyle } = require('discord.js');
const { GiveawaysManager } = require('@hiratanagis/awardify');

const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.GuildMessageReactions
    ]
});

const manager = new GiveawaysManager(client, {
    storage: './giveaways.json',
    default: {
        botsCanWin: false,
        embedColor: '#FF0000',
        embedColorEnd: '#000000',
        reaction: null, // Set to null to use buttons instead of reaction emojis
        buttons: {
            join: new ButtonBuilder()
                .setCustomId('join_giveaway')
                .setEmoji('🎉')
                .setLabel('{this.entrantIds.length}') // Displays dynamic participant count
                .setStyle(ButtonStyle.Primary),
            leave: new ButtonBuilder()
                .setLabel('Leave Giveaway')
                .setStyle(ButtonStyle.Danger),
            participants: new ButtonBuilder()
                .setCustomId('participants_giveaway')
                .setLabel('Participants')
                .setEmoji('👥')
                .setStyle(ButtonStyle.Secondary),
            joinReply: '✅ You have successfully entered the giveaway!',
            leaveReply: '❌ You have left the giveaway.',
            notAllowedToJoinReply: '❌ You are not allowed to join this giveaway'
        }
    }
});

client.on('ready', () => {
    console.log('Bot is ready!');
});

client.login('YOUR_BOT_TOKEN');

Dynamic Templates Evaluation

Any text provided to button labels, custom IDs, URLs, or replies can include bracketed template strings that will be dynamically evaluated in the context of the Giveaway instance.

Some useful template variables you can use:

  • {this.entrantIds.length} - The current count of participants in the giveaway.
  • {this.prize} - The prize of the giveaway.
  • {this.winnerCount} - The number of winners to be picked.
  • {this.messageURL} - The Discord message URL of the giveaway.

For example, setting the join button's label to "{this.entrantIds.length}" will automatically update the button label dynamically on Discord whenever a user joins or leaves the giveaway.

Credits