@discordhttps/nodejs-adapter
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Nodejs Runtime Adapter

npm version License Downloads

@discordhttps/nodejs-adapter is an adapter for integrating discord.https with Nodejs Runtime.

Installation

npm install @discordhttps/nodejs-adapter discord.https

Usage

import Client from "discord.https";
import NodeAdapter from "@discordhttps/nodejs-adapter";
const adapter = new NodeAdapter();

import UtilityRoute from "./command/utility/index.js";
import HelloRoute from "./command/fun/hello.js";

const client = new Client({
  token: process.env.TOKEN,
  publicKey: process.env.PUBLIC_KEY,
  httpAdapter: adapter,
  debug: true,
});

client.register(UtilityRoute, HelloRoute);

client.listen("interactions", 3000, () => {
  console.log("Server is active with the interaction webhook at /interactions");
});

Package Sidebar

Install

npm i @discordhttps/nodejs-adapter

Weekly Downloads

73

Version

1.0.2

License

MIT

Unpacked Size

5.1 kB

Total Files

5

Last publish

Collaborators

  • discord.https