mirror of
https://github.com/discordjs/discord.js.git
synced 2024-08-20 23:04:42 +12:00
chore: reexport rest (#8372)
This commit is contained in:
parent
a7deb8f898
commit
e5bfe2c7c2
4 changed files with 12 additions and 17 deletions
11
README.md
11
README.md
|
@ -46,19 +46,18 @@ pnpm add discord.js
|
|||
|
||||
## Example usage
|
||||
|
||||
Install all required dependencies:
|
||||
Install discord.js:
|
||||
|
||||
```sh-session
|
||||
npm install discord.js @discordjs/rest
|
||||
yarn add discord.js @discordjs/rest
|
||||
pnpm add discord.js @discordjs/rest
|
||||
npm install discord.js
|
||||
yarn add discord.js
|
||||
pnpm add discord.js
|
||||
```
|
||||
|
||||
Register a slash command against the Discord API:
|
||||
|
||||
```js
|
||||
const { REST } = require('@discordjs/rest');
|
||||
const { Routes } = require('discord.js');
|
||||
const { REST, Routes } = require('discord.js');
|
||||
|
||||
const commands = [
|
||||
{
|
||||
|
|
|
@ -45,19 +45,18 @@ pnpm add discord.js
|
|||
|
||||
## Example usage
|
||||
|
||||
Install all required dependencies:
|
||||
Install discord.js:
|
||||
|
||||
```sh-session
|
||||
npm install discord.js @discordjs/rest
|
||||
yarn add discord.js @discordjs/rest
|
||||
pnpm add discord.js @discordjs/rest
|
||||
npm install discord.js
|
||||
yarn add discord.js
|
||||
pnpm add discord.js
|
||||
```
|
||||
|
||||
Register a slash command against the Discord API:
|
||||
|
||||
```js
|
||||
const { REST } = require('@discordjs/rest');
|
||||
const { Routes } = require('discord.js');
|
||||
const { REST, Routes } = require('discord.js');
|
||||
|
||||
const commands = [
|
||||
{
|
||||
|
|
|
@ -180,9 +180,6 @@ exports.WelcomeScreen = require('./structures/WelcomeScreen');
|
|||
exports.WebSocket = require('./WebSocket');
|
||||
|
||||
// External
|
||||
exports.DiscordAPIError = require('@discordjs/rest').DiscordAPIError;
|
||||
exports.HTTPError = require('@discordjs/rest').HTTPError;
|
||||
exports.RateLimitError = require('@discordjs/rest').RateLimitError;
|
||||
|
||||
__exportStar(require('discord-api-types/v10'), exports);
|
||||
__exportStar(require('@discordjs/builders'), exports);
|
||||
__exportStar(require('@discordjs/rest'), exports);
|
||||
|
|
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
|
@ -5622,4 +5622,4 @@ export type InternalDiscordGatewayAdapterCreator = (
|
|||
// External
|
||||
export * from 'discord-api-types/v10';
|
||||
export * from '@discordjs/builders';
|
||||
export { DiscordAPIError, HTTPError, RateLimitError } from '@discordjs/rest';
|
||||
export * from '@discordjs/rest';
|
||||
|
|
Loading…
Reference in a new issue