0.3.18 • Published 2 months ago

@discord-interactions/api v0.3.18

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 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.18

2 months ago

0.3.16

1 year ago

0.3.14

1 year ago

0.3.10

1 year ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2

2 years ago

0.3.0

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago