chore(readme): clarify the use of ES modules in readme examples (#10934)

* chore(readme): clarify the use of ES modules in readme examples

resolves #10932

* fix: revert api extractor readme changes
This commit is contained in:
Souji
2025-06-23 21:27:55 +02:00
committed by GitHub
parent cd76c9a47b
commit 615faf5f6f
5 changed files with 10 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ pnpm add @discordjs/brokers
## Example usage ## Example usage
These examples use [ES modules](https://nodejs.org/api/esm.html#enabling).
### pub sub ### pub sub
```ts ```ts

View File

@@ -34,6 +34,8 @@ pnpm add @discordjs/core
## Example usage ## Example usage
These examples use [ES modules](https://nodejs.org/api/esm.html#enabling).
```ts ```ts
import { REST } from '@discordjs/rest'; import { REST } from '@discordjs/rest';
import { WebSocketManager } from '@discordjs/ws'; import { WebSocketManager } from '@discordjs/ws';

View File

@@ -56,6 +56,8 @@ pnpm add discord.js
bun add discord.js bun add discord.js
``` ```
These examples use [ES modules](https://nodejs.org/api/esm.html#enabling).
Register a slash command against the Discord API: Register a slash command against the Discord API:
```js ```js

View File

@@ -35,6 +35,8 @@ bun add @discordjs/formatters
## Example usage ## Example usage
The example uses [ES modules](https://nodejs.org/api/esm.html#enabling).
````ts ````ts
import { codeBlock } from '@discordjs/formatters'; import { codeBlock } from '@discordjs/formatters';

View File

@@ -40,6 +40,8 @@ bun add @discordjs/ws
## Example usage ## Example usage
The example uses [ES modules](https://nodejs.org/api/esm.html#enabling).
```ts ```ts
import { WebSocketManager, WebSocketShardEvents, CompressionMethod } from '@discordjs/ws'; import { WebSocketManager, WebSocketShardEvents, CompressionMethod } from '@discordjs/ws';
import { REST } from '@discordjs/rest'; import { REST } from '@discordjs/rest';