@fuwa/rest
v0.4.0
Published
A simple REST client for Discord's public API
Downloads
6
Readme
@fuwa/rest
A minimal, yet feature-complete, client for Discord's public REST API. Uses undici internally.
Installation
# using yarn
$ yarn add @fuwa/rest
# or pnpm
$ pnpm add @fuwa/rest
# or even npm
$ npm install --save @fuwa/rest
Usage
import { REST } from '@fuwa/rest';
const client = new REST("my_token");
await client.patch("/users/@me", {
body: {
username: "fuwa_l0v3r"
},
});
// want it simpler? here you go:
await client.editCurrentUser({
username: "fuwa_l0v3r_shorthand"
});
Documentation
All endpoints under REST
are represented by their name in the Discord Developer Docs.
Documentation is planned and on the roadmap. Check back here later.