0.3.21 • Published 10 months ago

@discord-interactions/api v0.3.21

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

@discord-interactions/api

A simple, typed wrapper around the Discord API.

This package is built on top of @discord-interactions/request and discord-api-types - it is fully typed and handles rate limits appropriately.

It is used internally within @discord-interactions/core, but can easily be used outside of this context.

Installation

npm install @discord-interactions/api

Example Usage

import { client } from "discord-api";

try {
	const response = await client.postGlobalApplicationCommand(
		process.env.APPLICATION_ID,
		payload
	);
} catch (error: unknown) {
	console.error((error as Error).message);
}

Credits

This code is derived from @IanMitchell's Interaction Kit: discord-api and distributed under the Apache 2 license. It was changed to use @discord-interactions/request.

0.3.21

10 months ago

0.3.18

1 year ago

0.3.16

2 years ago

0.3.14

2 years ago

0.3.10

2 years ago

0.3.8

3 years ago

0.3.7

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.0

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago