Skip to content

Commit

Permalink
chore: reexport rest (#8372)
Browse files Browse the repository at this point in the history
  • Loading branch information
Syjalo committed Jul 29, 2022
1 parent a7deb8f commit e5bfe2c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
11 changes: 5 additions & 6 deletions packages/discord.js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down
5 changes: 1 addition & 4 deletions packages/discord.js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 1 addition & 1 deletion packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

1 comment on commit e5bfe2c

@vercel
Copy link

@vercel vercel bot commented on e5bfe2c Jul 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.