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:
柚子Youzi
2025-04-20 22:10:24 +08:00
committed by GitHub
parent 92e07c8f7f
commit 8f35dfd039

View File

@@ -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);