discord-api-methods
v0.0.5
Published
A modern Discord HTTP REST API wrapper library
Downloads
1
Readme
discord-api-methods
A wrapper around the Discord REST API. This package is built on top of discord-request
and discord-api-types
- it is fully typed and handles rate limits appropriately.
Requires Node v18+ or a ServiceWorker Environment
Installation
Install the package by running
npm install discord-api-methods
Example Usage
import { client } from "discord-api-methods";
try {
const response = await client.postGlobalApplicationCommand(
process.env.APPLICATION_ID,
payload
);
} catch (error: unknown) {
console.error((error as Error).message);
}