New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

discord.https

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord.https

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.

latest
Source
npmnpm
Version
3.0.16
Version published
Maintainers
1
Created
Source

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

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
  • Build a simplified npx create-app command
  • Build interaction wrapper
  • HTTP adapters to support most hosting environments. Currently implemented: Node.js adapter for Node.js runtime and Cloudflare adapter for V8 isolates runtime
  • Examples(currently outdated, requires update)

Keywords

discord

FAQs

Package last updated on 07 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts