* 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>
* Importing Token
Importing token was missing, so I added it. It is getting the token from configuration file.
It could have been done with defining a constant variable too, but importing makes more sense.
* Updated Token Field to "dotenv"
From now, user's can use dotenv package to keep their Discord client token.
* Referring token as DISCORD_TOKEN
Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
---------
Co-authored-by: Jaw0r3k <jaworekwiadomosci@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
BREAKING CHANGE: NodeJS v18+ is required when using node due to the use of global `fetch`
BREAKING CHANGE: The raw method of REST now returns a web compatible `Respone` object.
BREAKING CHANGE: The `parseResponse` utility method has been updated to operate on a web compatible `Response` object.
BREAKING CHANGE: Many underlying internals have changed, some of which were exported.
BREAKING CHANGE: `DefaultRestOptions` used to contain a default `agent`, which is now set to `null` instead.
* feat(core): implement some ws send events
* fix: check guild id and add a timeout
* fix: only check for nonce
* chore: update readme
* chore: make requested changes
* chore: make methods consistent
* chore: fix readme example
* chore: move shard ID calculation to util
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>