mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs(readme): add import statement for pure REST usage to align with other examples (#10838)
* docs(readme): add import statement for pure REST usage to align with other examples Added missing `import` statements in the "Independent REST API Usage" section to maintain consistency with the rest of the README examples. This change also ensures that the usage of `@discordjs/core` reflects a REST-only setup by importing from `@discordjs/core/http-only`, which avoids dependency issues like `Can't resolve 'zlib-sync'`. * fix: standardize import quotes in README.md * style: organise imports --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
@@ -71,6 +71,9 @@ gateway.connect();
|
||||
## Independent REST API Usage
|
||||
|
||||
```ts
|
||||
import { API } from '@discordjs/core/http-only';
|
||||
import { REST } from '@discordjs/rest';
|
||||
|
||||
// Create REST instance
|
||||
const rest = new REST({ version: '10' }).setToken(token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user