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

botliysdk

v1.0.1

Published

The official API SDK for botliy

Readme

Botliy Node.js SDK

The official API SDK for botliy.online. Easily communicate with our platform using JavaScript or TypeScript to post your bot stats, check user votes, and authenticate webhooks seamlessly!

Installation

Install the package directly from NPM:

npm install botliysdk
# or using yarn / pnpm
yarn add botliysdk
pnpm add botliysdk

(Requires Node.js 16+)


🚀 Quick Start Example

Here is a simple example covering how to initialize the bot and use the SDK:

import { Botliy } from 'botliysdk'; // Or const { Botliy } = require('botliysdk');

// 1. Initialize the client
const botliy = new Botliy({
  apiToken: "your_api_token_here", 
  botId: "your_bot_id_here",
  webhookSecret: "your_optional_webhook_secret_here"
});

// 2. Post Bot Stats
// (It's recommended to do this on a loop every 30 minutes in your bot code)
await botliy.postStats({
  server_count: 1500,
  shard_count: 1
});

// 3. Check if a user voted for your bot!
const response = await botliy.checkVote("some_user_discord_id");
if (response.voted === 1) {
    console.log("This user cast a vote!");
} else {
    console.log("This user has not voted.");
}

📖 API Methods

botliy.postStats(options: PostStatsOptions)

Posts your bot's current server and shard numbers. options requires server_count and optionally shard_count. Returns a promise resolving to the API's response.

botliy.getStats()

Returns a promise resolving to an object of your bot's stats currently registered on Botliy's servers.

botliy.getVotes()

Returns a promise resolving to an object containing the last 1,000 votes for your bot.

botliy.checkVote(userId: string)

Checks whether a specific user ID has voted for your bot in the last 12 hours. The returned object will contain voted: 1 if they have, or 0 if they have not.

botliy.verifyWebhook(authorizationHeader: string | undefined)

Utility method to seamlessly verify Discord webhook requests you receive on your HTTP server (Express, Fastify, etc.). Compare the Authorization header request sent to you against your configured Webhook secret. Returns true if it successfully matches!


For detailed usage examples integrating discord.js and Express, view our Full API Reference Documentation.