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

discord.https

v3.0.16

Published

Discord.https is a modular library for building and managing Discord HTTP interactions with the Discord API. It provides tools for routing and managing interaction efficiently.

Readme

Logo

Discord npm version License Downloads Docs

Discord.https is a robust, modular library for implementing Discord HTTP interactions.

It handles various interactions, adds a layer of wrapper over raw interactions with rich utility methods, and organizes them into modular routes, making your bot's code cleaner, easier to understand, and easier to maintain. It works seamlessly in both serverless and persistent server environments.

📄 Documentation: https://discordhttps.js.org

Need help? Join us on discord https://discord.gg/pSgfJ4K5ej

Initilize discord.https

You can initialize a project via CLI:

npx create-discord-https@latest

Or, manually:

import Client from "discord.https";
import NodeAdapter from "@discordhttps/nodejs-adapter";

const client = new Client({
  token: "YOUR BOT TOKEN",
  publicKey: "YOUR PUBLIC KEY",
  httpAdapter: new NodeAdapter(),
});

client.command(
  (builder) => builder.setName("hi").setDescription("reply hello!"),
  async (interaction) => await interaction.reply("hello!")
);

await client.listen("interactions", 3000, () => {
  console.log(
    "Listening for interactions on port 3000 at the /interactions endpoint"
  );
});

Project Updates

Note: Looking for volunteer contributors! If you are interested, join us on Discord: https://discord.gg/pSgfJ4K5ej

Note: Utility methods such as .editReply() and .deferReply() are currently in development, so you won’t need to manually handle the raw response object in the future.

Note: Utility methods were initially planned to closely follow Discord.js. However, since HTTP interactions are mostly used in a serverless environment, instead of having many layers of objects like Discord.js, an Eris-like approach will be adopted to keep the utilities minimal and lightweight.

Breaking Update (latest note): The goal was to stay within the web-standard V8 engine, but @discord/rest heavily depends on the Node.js environment. There are two choices: either use @discord/rest or build a custom REST handler. For now, @discord/rest will be used. The focus is on the Edge network, primarily Cloudflare. However, Cloudflare recently added native Node.js support. Previously, Node.js support was polyfilled, which can be inefficient for servers due to extra overhead. Now, Node.js support is native. Hence, from now on, the focus will be on Node.js APIs instead of web-standard/browser-context APIs.

Examples

Note: You can get this reference implementation directly via CLI, see Initializing Your Project → Using CLI.

You can view example/reference implementations here:

Initializing Your Project

Using CLI (Recommended)

npx create-discord-https@latest

Follow the prompts to set up your project.

Manual Installation

Install discord.https along with the adapter for your server environment.

Node.js

npm install discord.https @discordhttps/nodejs-adapter

Cloudflare

npm install discord.https @discordhttps/cloudflare-adapter

Vercel

npm install discord.https @discordhttps/vercel-adapter

Documentation

Todo for v4

  • [ ] Implement tests
  • [ ] Build channel, guild, etc wrapper
  • [x] ~~Build a simplified npx create-app command~~
  • [x] ~~Build interaction wrapper~~
  • [x] ~~HTTP adapters to support most hosting environments~~. Currently implemented: Node.js adapter for Node.js runtime and Cloudflare adapter for V8 isolates runtime
  • [x] Examples(currently outdated, requires update)