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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@synthexia/bpapi-wrapper

v5.0.0

Published

BPAPI Wrapper allows you to work with BDFD Public API more easier and pretty!

Readme

[!NOTE] This is the fifth iteration of the package.

The code base was fully rewritten from scratch, and support for Nodes endpoint was removed due to compatibility issues in some bundled projects caused by jsdom, replacement of which I could not find.

Anyways, here are quick examples of using the new version, breaking changes are applied for it, but responses remain the same.

Examples

Of course, you have to import the wrapper first:

import { Wrapper } from "@synthexia/bpapi-wrapper";

Function Info Endpoint

new Wrapper("function")
	.function("info", "$addS")
	.then((info) => {
		// Work with the response
	})
	.catch((r) => {
		// Catch an error
	});
{
	"tag": "$addSelectMenuOption[Menu option ID;Label;Value;Description;(Default;Emoji;Message ID)]",
	"description": "Adds select menu option to a select menu. Check wiki for examples.",
	"args": [
		{
			"name": "Menu option ID",
			"type": "String",
			"required": true
		},
		{
			"name": "Label",
			"type": "String",
			"required": true
		},
		{
			"name": "Value",
			"type": "String",
			"required": true
		},
		{
			"name": "Description",
			"type": "String",
			"required": true,
			"empty": true
		},
		{
			"name": "Default",
			"type": "Bool",
			"required": false,
			"empty": true
		},
		{
			"name": "Emoji",
			"type": "Emoji",
			"required": false,
			"empty": true
		},
		{
			"name": "Message ID",
			"type": "String",
			"required": false,
			"empty": true
		}
	],
	"intents": "None",
	"premium": false
}

Callback List Endpoint

new Wrapper("callback")
	.callback("list")
	.then((list) => {
		// Work with the response
	})
	.catch((r) => {
		// Catch an error
	});
[
	{
		"name": "$onJoined[channel ID]",
		"description": "Triggers command when user joins server",
		"args": [
			{
				"name": "Channel ID",
				"description": "Channel ID of the welcome channel",
				"type": "Snowflake",
				"required": true
			}
		],
		"intents": "Members",
		"premium": false
	},
	{
		"name": "$onLeave[channel ID]",
		"description": "Triggers command when user leaves server",
		"args": [
			{
				"name": "Channel ID",
				"description": "Channel ID of the leave channel",
				"type": "Snowflake",
				"required": true
			}
		],
		"intents": "Members",
		"premium": false
	},
	{
		"name": "$onMessageDelete[channel ID]",
		"description": "Triggers command when user deletes message",
		"args": [
			{
				"name": "Channel ID",
				"description": "Channel ID of the log channel",
				"type": "Snowflake",
				"required": true
			}
		],
		"intents": "None",
		"premium": false
	},
	{
		"name": "$onBanAdd[channel ID]",
		"description": "Triggers command when user is banned from the server",
		"args": [
			{
				"name": "Channel ID",
				"description": "Channel ID of the log channel",
				"type": "Snowflake",
				"required": true
			}
		],
		"intents": "None",
		"premium": false
	},
	{
		"name": "$onBanRemove[channel ID]",
		"description": "Triggers command when user is unbanned from the server",
		"args": [
			{
				"name": "Channel ID",
				"description": "Channel ID of the log channel",
				"type": "Snowflake",
				"required": true
			}
		],
		"intents": "None",
		"premium": false
	},
	{
		"name": "$alwaysReply",
		"description": "Makes command get triggered by every message",
		"args": [],
		"intents": "None",
		"premium": true
	},
	{
		"name": "$messageContains[word;...]",
		"description": "Command gets triggered every time message contains one of the provided words",
		"args": [
			{
				"name": "Word",
				"type": "String",
				"required": true
			}
		],
		"intents": "None",
		"premium": true
	},
	{
		"name": "$awaitedCommand[name;(filter)]",
		"description": "Used for awaited functions.",
		"args": [
			{
				"name": "Name",
				"description": "Awaited command name",
				"type": "String",
				"required": true
			},
			{
				"name": "Filter",
				"description": "Awaited command filter",
				"type": "String",
				"required": false
			}
		],
		"intents": "None",
		"premium": false
	},
	{
		"name": "$reaction[name]",
		"description": "Used for awaited reactions.",
		"args": [
			{
				"name": "Name",
				"description": "Awaited reaction name",
				"type": "String",
				"required": true
			}
		],
		"intents": "None",
		"premium": true
	},
	{
		"name": "$onInteraction[custom ID]",
		"description": "Triggered by a component interaction. For example: a user pressing a button",
		"args": [
			{
				"name": "Custom ID",
				"description": "Custom ID assigned to that interaction",
				"type": "String",
				"required": true
			}
		],
		"intents": "None",
		"premium": false
	},
	{
		"name": "$onInteraction",
		"description": "Triggered by a component interaction. For example: a user pressing a button",
		"args": [],
		"intents": "None",
		"premium": false
	}
]