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

bump4you.js

v1.0.23

Published

An API wrapper for the Bump4You API

Readme

About

bump4you.js provides developers with an intuitive interface to interact with the Bump4You API. Built with TypeScript, we provide full typings and a unified Client structure that feels right at home for developers familiar with discord.js.

Quick Start

npm install bump4you.js

Initializing the Client

import { Client } from "bump4you.js";

const client = new Client({
	baseURL: "https://api.bump4you.com", // Base API URL
	version: "v1", // API Version
	apiKey: "YOUR_API_KEY", // Your x-api-key
});

To get an API key, you will need to join our support server and contact a staff member.

Basic Usage

Below is a quick glance at all the available functions under the guilds and users managers.

Guilds Manager (client.guilds)

// Fetch a guild's profile
const guild = await client.guilds.fetch("GUILD_ID");

// Create a new guild
const newGuild = await client.guilds.create("GUILD_ID", {
	/* CreateGuildDto */
});

// Overwrite a guild using new data
const replacedGuild = await client.guilds.replace("GUILD_ID", {
	/* CreateGuildDto */
});

// Update specific fields on a guild
const updatedGuild = await client.guilds.edit("GUILD_ID", {
	/* UpdateGuildDto */
});

// Mark a guild as deleted
const deletedGuild = await client.guilds.delete("GUILD_ID");

// Restore a previously deleted guild
const restoredGuild = await client.guilds.restore("GUILD_ID");

// --- Administrative Methods ---
await client.guilds.setChecked("GUILD_ID", true);
await client.guilds.setForceNSFW("GUILD_ID", true);
await client.guilds.setShadowBanned("GUILD_ID", true);
await client.guilds.setBanned("GUILD_ID", true);
await client.guilds.setPartnered("GUILD_ID", true);
await client.guilds.setPremium("GUILD_ID", true);

// --- Operations ---
// Bump a guild
const result = await client.guilds.bump("GUILD_ID", {
	/* BumpDto */
});

// Fetch a guild's statistics
const stats = await client.guilds.getStats("GUILD_ID");

// --- Reports ---
const report = await client.guilds.getReport("GUILD_ID", "REPORT_ID");
const newReport = await client.guilds.createReport("GUILD_ID", {
	/* CreateReportDto */
});
await client.guilds.deleteReport("GUILD_ID", "REPORT_ID");

Users Manager (client.users)

// Fetch a user's profile
const user = await client.users.fetch("USER_ID");

// Create a new user profile
const newUser = await client.users.create("USER_ID", {
	/* CreateUserDto */
});

// Overwrite a user's profile
const replacedUser = await client.users.replace("USER_ID", {
	/* CreateUserDto */
});

// Update specific fields on a user's profile
const updatedUser = await client.users.edit("USER_ID");

// Delete a user's profile
const deletedUser = await client.users.delete("USER_ID");

Error Handling

If an API request fails, bump4you.js will throw a custom Bump4YouAPIError. This error includes the HTTP status code, letting you easily differentiate between errors such as hitting a cooldown (429) vs a not found (404).

import { Bump4YouAPIError } from "bump4you.js";

try {
	const result = await client.guilds.bump("GUILD_ID", {
		/* BumpDto */
	});
} catch (error) {
	if (error instanceof Bump4YouAPIError) {
		if (error.code === 404) {
			console.error("Guild not found in the database!");
		} else if (error.code === 429) {
			console.error("Guild is on cooldown! Try again later.");
		} else {
			console.error(`API Error ${error.code}: ${error.message}`);
		}
	} else {
		console.error("An unexpected error occurred:", error);
	}
}

Need Help?

Join our Discord Support Server if you have any questions or need assistance integrating the Bump4You API!