mirror of
https://github.com/discordjs/discord.js.git
synced 2026-05-23 03:50:09 +00:00
Compare commits
35 Commits
14.12.1
...
@discordjs
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d1b233047 | ||
|
|
4ab05e994e | ||
|
|
4bc2667a5f | ||
|
|
84ead6e554 | ||
|
|
0220fb7278 | ||
|
|
6da456767e | ||
|
|
67b30355ea | ||
|
|
58d9024245 | ||
|
|
5cd6382d1d | ||
|
|
fffe625a0c | ||
|
|
7321c291da | ||
|
|
ab3efb0211 | ||
|
|
7fa9ea3f0f | ||
|
|
af0f1aa765 | ||
|
|
99cadfd82b | ||
|
|
8f572a6bad | ||
|
|
d90ba8dce8 | ||
|
|
24fbb11ba2 | ||
|
|
727dc094d5 | ||
|
|
d5be4242c6 | ||
|
|
c1ff545bf1 | ||
|
|
188877c50a | ||
|
|
a1605b3a5e | ||
|
|
9ed1b59df6 | ||
|
|
0a9a3ede29 | ||
|
|
346fa57f95 | ||
|
|
b3c85d34a6 | ||
|
|
d8e37551ce | ||
|
|
a30d46c5f5 | ||
|
|
632a9b4965 | ||
|
|
3b18e5b08d | ||
|
|
692f0fc96d | ||
|
|
0de071d0a5 | ||
|
|
99194fc270 | ||
|
|
cf72d42ea5 |
@@ -61,9 +61,9 @@ body:
|
||||
label: Versions
|
||||
description: List necessary versions here. This includes your package version, runtime version, operating system etc.
|
||||
placeholder: |
|
||||
- discord.js 14.9.0 (`npm ls discord.js` or another package)
|
||||
- Node.js 16.9.0 (`node --version`)
|
||||
- TypeScript 5.0.4 (`npm ls typescript` if you use it)
|
||||
- discord.js 14.12.1 (`npm ls discord.js` or another package)
|
||||
- Node.js 16.11.0 (`node --version`)
|
||||
- TypeScript 5.1.6 (`npm ls typescript` if you use it)
|
||||
- macOS Ventura 13.3.1
|
||||
validations:
|
||||
required: true
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
CODEOWNERS
|
||||
CHANGELOG.md
|
||||
|
||||
222
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
222
.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,14 +1,10 @@
|
||||
logFilters:
|
||||
# MISSING_PEER_DEPENDENCY
|
||||
- code: YN0002
|
||||
level: discard
|
||||
# FETCH_NOT_CACHED
|
||||
- code: YN0013
|
||||
level: discard
|
||||
# NODE_GYP_INJECTED
|
||||
- code: YN0032
|
||||
level: discard
|
||||
# INCOMPATIBLE_PEER_DEPENDENCY
|
||||
- code: YN0060
|
||||
level: discard
|
||||
|
||||
@@ -24,4 +20,4 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-docker-build.cjs
|
||||
spec: 'https://github.com/Dcard/yarn-plugins/releases/latest/download/plugin-docker-build.js'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.5.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.6.1.cjs
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
"@code-hike/mdx": "^0.9.0",
|
||||
"@discordjs/ui": "workspace:^",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@vercel/analytics": "^1.0.1",
|
||||
"@vercel/analytics": "^1.0.2",
|
||||
"@vercel/edge-config": "^0.2.1",
|
||||
"@vercel/og": "^0.5.9",
|
||||
"@vercel/og": "^0.5.11",
|
||||
"ariakit": "^2.0.0-next.44",
|
||||
"cmdk": "^0.2.0",
|
||||
"contentlayer": "0.3.1",
|
||||
"next": "^13.4.12",
|
||||
"next": "^13.4.17",
|
||||
"next-contentlayer": "0.3.1",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
@@ -62,27 +62,27 @@
|
||||
"rehype-autolink-headings": "^6.1.1",
|
||||
"rehype-slug": "^5.1.0",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"sharp": "^0.32.4"
|
||||
"sharp": "^0.32.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^13.4.12",
|
||||
"@next/bundle-analyzer": "^13.4.17",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/html-escaper": "^3.0.0",
|
||||
"@types/node": "18.17.1",
|
||||
"@types/react": "^18.2.17",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@unocss/cli": "^0.54.0",
|
||||
"@unocss/eslint-config": "^0.54.0",
|
||||
"@unocss/reset": "^0.54.0",
|
||||
"@vitejs/plugin-react": "^4.0.3",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@unocss/cli": "^0.55.1",
|
||||
"@unocss/eslint-config": "^0.55.1",
|
||||
"@unocss/reset": "^0.55.1",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"concurrently": "^8.2.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"happy-dom": "^10.5.2",
|
||||
"happy-dom": "^10.10.2",
|
||||
"hast-util-to-string": "^2.0.0",
|
||||
"hastscript": "^7.2.0",
|
||||
"html-escaper": "^3.0.3",
|
||||
@@ -90,9 +90,9 @@
|
||||
"prettier": "^2.8.8",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"unocss": "^0.54.0",
|
||||
"vercel": "^31.2.0",
|
||||
"vitest": "^0.33.0"
|
||||
"unocss": "^0.55.1",
|
||||
"vercel": "^31.4.0",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.13.0"
|
||||
|
||||
@@ -7,11 +7,11 @@ category: Installations and preparations
|
||||
|
||||
## Installing Node.js
|
||||
|
||||
To use discord.js, you'll need to install [Node.js](https://nodejs.org/). discord.js v14 requires Node v16.9.0 or higher.
|
||||
To use discord.js, you'll need to install [Node.js](https://nodejs.org/). discord.js v14 requires Node v16.11.0 or higher.
|
||||
|
||||
<Alert title="Tip" type="success">
|
||||
To check if you already have Node installed on your machine \(e.g., if you're using a VPS\), run _`node -v`_ in your
|
||||
terminal. If it outputs _`v16.9.0`_ or higher, then you're good to go! Otherwise, continue reading.
|
||||
terminal. If it outputs _`v16.11.0`_ or higher, then you're good to go! Otherwise, continue reading.
|
||||
</Alert>
|
||||
|
||||
On Windows, it's as simple as installing any other program. Download the latest version from [the Node.js website](https://nodejs.org/), open the downloaded file, and follow the steps from the installer.
|
||||
@@ -48,7 +48,7 @@ On macOS, either:
|
||||
|
||||
On Linux, you can quickly open the terminal with <kbd>Ctrl + Alt + T</kbd>.
|
||||
|
||||
With the terminal open, run the _`node -v`_ command to make sure you've successfully installed Node.js. If it outputs _`v16.9.0`_ or higher, great!
|
||||
With the terminal open, run the _`node -v`_ command to make sure you've successfully installed Node.js. If it outputs _`v16.11.0`_ or higher, great!
|
||||
|
||||
### Initiating a project folder
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ category: Additional info
|
||||
|
||||
## Before you start
|
||||
|
||||
v14 requires Node 16.9 or higher to use, so make sure you're up to date. To check your Node.js version, use _`node --version`_ in your terminal or command prompt, and if it's not high enough, update it! There are many resources online to help you with this step based on your host system.
|
||||
v14 requires Node 16.11 or higher to use, so make sure you're up to date. To check your Node.js version, use _`node --version`_ in your terminal or command prompt, and if it's not high enough, update it! There are many resources online to help you with this step based on your host system.
|
||||
|
||||
### Various packages are now included in v14
|
||||
|
||||
|
||||
@@ -49,19 +49,19 @@
|
||||
"@discordjs/api-extractor-utils": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@discordjs/ui": "workspace:^",
|
||||
"@microsoft/api-extractor-model": "7.27.5",
|
||||
"@microsoft/api-extractor-model": "7.27.6",
|
||||
"@microsoft/tsdoc": "0.14.2",
|
||||
"@planetscale/database": "1.7.0",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@vercel/analytics": "^1.0.1",
|
||||
"@vercel/analytics": "^1.0.2",
|
||||
"@vercel/edge-config": "^0.2.1",
|
||||
"@vercel/og": "^0.5.9",
|
||||
"@vercel/og": "^0.5.11",
|
||||
"ariakit": "^2.0.0-next.44",
|
||||
"bright": "^0.8.4",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"cmdk": "^0.2.0",
|
||||
"meilisearch": "^0.33.0",
|
||||
"next": "^13.4.12",
|
||||
"meilisearch": "^0.34.1",
|
||||
"next": "^13.4.17",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
@@ -71,34 +71,34 @@
|
||||
"rehype-raw": "^6.1.1",
|
||||
"rehype-slug": "^5.1.0",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"sharp": "^0.32.4",
|
||||
"swr": "^2.2.0"
|
||||
"sharp": "^0.32.5",
|
||||
"swr": "^2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^13.4.12",
|
||||
"@next/bundle-analyzer": "^13.4.17",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/node": "18.17.1",
|
||||
"@types/react": "^18.2.17",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@unocss/cli": "^0.54.0",
|
||||
"@unocss/eslint-config": "^0.54.0",
|
||||
"@unocss/reset": "^0.54.0",
|
||||
"@vitejs/plugin-react": "^4.0.3",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@unocss/cli": "^0.55.1",
|
||||
"@unocss/eslint-config": "^0.55.1",
|
||||
"@unocss/reset": "^0.55.1",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"concurrently": "^8.2.0",
|
||||
"cpy-cli": "^5.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"happy-dom": "^10.5.2",
|
||||
"happy-dom": "^10.10.2",
|
||||
"lighthouse": "^10.4.0",
|
||||
"prettier": "^2.8.8",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vercel": "^31.2.0",
|
||||
"vitest": "^0.33.0"
|
||||
"vercel": "^31.4.0",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.13.0"
|
||||
|
||||
18
package.json
18
package.json
@@ -46,20 +46,20 @@
|
||||
},
|
||||
"homepage": "https://discord.js.org",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.6.7",
|
||||
"@commitlint/config-angular": "^17.6.7",
|
||||
"@commitlint/cli": "^17.7.1",
|
||||
"@commitlint/config-angular": "^17.7.0",
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@favware/npm-deprecate": "^1.0.7",
|
||||
"conventional-changelog-cli": "^3.0.0",
|
||||
"husky": "^8.0.3",
|
||||
"is-ci": "^3.0.1",
|
||||
"lint-staged": "^13.2.3",
|
||||
"tsup": "^7.1.0",
|
||||
"lint-staged": "^13.3.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"unocss": "^0.54.0",
|
||||
"vercel": "^31.2.0",
|
||||
"vitest": "^0.33.0"
|
||||
"unocss": "^0.55.1",
|
||||
"vercel": "^31.4.0",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"@microsoft/tsdoc-config@~0.16.1": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
||||
@@ -71,11 +71,11 @@
|
||||
"yaml@^2.1.1": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"workspaces": [
|
||||
"apps/*",
|
||||
"packages/*"
|
||||
],
|
||||
"packageManager": "yarn@3.5.1"
|
||||
"packageManager": "yarn@3.6.1"
|
||||
}
|
||||
|
||||
@@ -45,22 +45,22 @@
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@planetscale/database": "^1.10.0",
|
||||
"tslib": "^2.6.1",
|
||||
"undici": "^5.22.1"
|
||||
"undici": "5.22.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,12 @@ runs:
|
||||
files: ./packages/discord.js/coverage/cobertura-coverage.xml
|
||||
flags: discord.js
|
||||
|
||||
- name: Upload Formatters Coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ./packages/formatters/coverage/cobertura-coverage.xml
|
||||
flags: formatters
|
||||
|
||||
- name: Upload Next Coverage
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
|
||||
@@ -32,22 +32,22 @@
|
||||
},
|
||||
"homepage": "https://discord.js.org",
|
||||
"dependencies": {
|
||||
"@microsoft/api-extractor-model": "7.27.5",
|
||||
"@microsoft/api-extractor-model": "7.27.6",
|
||||
"@microsoft/tsdoc": "0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.39",
|
||||
"@types/node": "16.18.40",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,23 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/brokers@0.2.2](https://github.com/discordjs/discord.js/compare/@discordjs/brokers@0.2.1...@discordjs/brokers@0.2.2) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/brokers@0.2.1](https://github.com/discordjs/discord.js/compare/@discordjs/brokers@0.2.0...@discordjs/brokers@0.2.1) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae))
|
||||
|
||||
# [@discordjs/brokers@0.2.1](https://github.com/discordjs/discord.js/compare/@discordjs/brokers@0.2.0...@discordjs/brokers@0.2.1) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/brokers
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/brokers",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "Powerful set of message brokers",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -64,21 +64,21 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,33 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/builders@1.6.5](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.4...@discordjs/builders@1.6.5) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/builders@1.6.3](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.2...@discordjs/builders@1.6.3) - (2023-05-01)
|
||||
|
||||
## Refactor
|
||||
|
||||
- Remove `@discordjs/util` re-export (#9488) ([54ceedf](https://github.com/discordjs/discord.js/commit/54ceedf6c535d4641643d4106b6286cbef09de4a))
|
||||
|
||||
# [@discordjs/builders@1.6.2](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.1...@discordjs/builders@1.6.2) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **BaseSelectMenuBuilder:** Modify class to be `abstract` (#9358) ([ca4de2d](https://github.com/discordjs/discord.js/commit/ca4de2d9c6bc204e85d1b7eae7eabd23dbeb4475))
|
||||
- Correct `@link` tags that involve parents (#9351) ([fbbce3e](https://github.com/discordjs/discord.js/commit/fbbce3eb4ba20bc0c4806ca2259d1f86001594be))
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
- **builders:** Add some basic documentation (#9359) ([8073561](https://github.com/discordjs/discord.js/commit/8073561824f911d1a18d0b4f1de39f452bc69fa9))
|
||||
- Use `@link` in `@see` (#9348) ([d66d113](https://github.com/discordjs/discord.js/commit/d66d1133331b81563588db4500c63a18c3c3dfae))
|
||||
|
||||
# [@discordjs/builders@1.6.3](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.6.2...@discordjs/builders@1.6.3) - (2023-05-01)
|
||||
|
||||
## Refactor
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/builders
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/builders",
|
||||
"version": "1.6.4",
|
||||
"version": "1.6.5",
|
||||
"description": "A set of builders that you can use when creating your bot",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -59,30 +59,30 @@
|
||||
"@discordjs/formatters": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"@sapphire/shapeshift": "^3.9.2",
|
||||
"discord-api-types": "^0.37.50",
|
||||
"discord-api-types": "0.37.50",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"ts-mixer": "^6.0.3",
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"downlevel-dts": "^0.11.0",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,28 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/collection@1.5.3](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.2...@discordjs/collection@1.5.3) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/collection@1.5.2](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.1...@discordjs/collection@1.5.2) - (2023-07-31)
|
||||
|
||||
## Refactor
|
||||
|
||||
- **collection:** Reduce `reduce`'s code (#9581) ([b85a3f2](https://github.com/discordjs/discord.js/commit/b85a3f2ddee8fc5974749b95fc07389a03093df2))
|
||||
|
||||
# [@discordjs/collection@1.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.0...@discordjs/collection@1.5.1) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
|
||||
# [@discordjs/collection@1.5.2](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.5.1...@discordjs/collection@1.5.2) - (2023-07-31)
|
||||
|
||||
## Refactor
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/collection
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/collection",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"description": "Utility data structure used in discord.js",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -53,22 +53,22 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,72 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/core@1.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/core@1.0.0...@discordjs/core@1.0.1) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/core@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.6.0...@discordjs/core@1.0.0) - (2023-07-31)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **core:** Fix inconsistencies on `core` (#9680) ([6d5840c](https://github.com/discordjs/discord.js/commit/6d5840c61e5164c461b821fbd79b71b812aa046e))
|
||||
- **client:** Add missing application command permissions update event (#9639) ([2818d7c](https://github.com/discordjs/discord.js/commit/2818d7cc1d76c06252a5d89dbc48c4340cf23f3f))
|
||||
- **api:** Various fixes for overlooked stuff (#9588) ([6c7a5ed](https://github.com/discordjs/discord.js/commit/6c7a5ed1e7f05ca9350cb84c429c76acf3851fc0))
|
||||
- **GuildsAPI:** Use `level` rather than `mfa_level` when editing MFA (#9584) ([3535321](https://github.com/discordjs/discord.js/commit/3535321b98cec4a715aca19e8fd34e6d3b27975f))
|
||||
- **roleConnections:** Fix `body` type for `updateMetadataRecords()` (#9516) ([166c961](https://github.com/discordjs/discord.js/commit/166c9612611b8665a62d8a5f657f64b5a266d0f4))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Define /core token in example (#9586) ([bc2798b](https://github.com/discordjs/discord.js/commit/bc2798b8ee33895506c4bc684b59bc8acefb615d))
|
||||
|
||||
## Features
|
||||
|
||||
- **WebhooksAPI:** Allow `with token` requests without bot auth (#9715) ([bc83cab](https://github.com/discordjs/discord.js/commit/bc83cabfdad76fec9352ddb9a7d488e058ede180))
|
||||
- Guild onboarding (#9120) ([dc73c93](https://github.com/discordjs/discord.js/commit/dc73c938ff9d04a0d7d57630faeb8e81ea343006))
|
||||
- **ChannelsAPI:** Add permission overwrites (#9651) ([78381a5](https://github.com/discordjs/discord.js/commit/78381a56cf9a122d0a44ab1b0966cb0d7691ad7d))
|
||||
- **api:** Add stage instances (#9578) ([985def3](https://github.com/discordjs/discord.js/commit/985def3f255b37891642172a3c83897c1d2749f6))
|
||||
- **GuildsAPI:** Add `removeMember()` (#9576) ([5d6eed6](https://github.com/discordjs/discord.js/commit/5d6eed64140029837043cf537033b97c40f39607))
|
||||
- **api:** Add `getMemberBans()` query options and `getMemberBan()` (#9569) ([590f5bc](https://github.com/discordjs/discord.js/commit/590f5bc38e6eab09e8d3d6cfd3967390202913c4))
|
||||
- **client:** Support more request member fields (#9475) ([1edd01a](https://github.com/discordjs/discord.js/commit/1edd01a7a494ee7604b81bc2a3ec25a55d957f92))
|
||||
|
||||
## Refactor
|
||||
|
||||
- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
|
||||
- **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.
|
||||
|
||||
## Typings
|
||||
|
||||
- Use `Snowflake` instead of `string` for snowflakes (#9583) ([1c4a12c](https://github.com/discordjs/discord.js/commit/1c4a12c7d62d060d655668a81d0ff4f1ae95607a))
|
||||
|
||||
# [@discordjs/core@0.6.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.5.2...@discordjs/core@0.6.0) - (2023-05-01)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update example usage (#9461) ([6212bff](https://github.com/discordjs/discord.js/commit/6212bffa30f4c6bbe6a81dc5b2b037e5b65d493c))
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
|
||||
## Features
|
||||
|
||||
- **core:** Abstract gateway (#9410) ([5d1a4c2](https://github.com/discordjs/discord.js/commit/5d1a4c27d5ee2686c8fab6cad8bd97d8d0876e66))
|
||||
|
||||
# [@discordjs/core@0.5.1](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.5.0...@discordjs/core@0.5.1) - (2023-04-16)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **interactions:** Make `data` parameter optional (#9379) ([66dc401](https://github.com/discordjs/discord.js/commit/66dc4014fe4553f1dd73aaa7c32fd83e10bde263))
|
||||
- **core:** Support attachment editing on interactions (#9356) ([676307f](https://github.com/discordjs/discord.js/commit/676307ff5c6c4ef56a353b6fc74501a1080da869))
|
||||
- **core:** Missed optional options (#9311) ([6912faa](https://github.com/discordjs/discord.js/commit/6912faa9b3852adbacc7d0b002aae81be041f529))
|
||||
|
||||
## Typings
|
||||
|
||||
- **ChannelsAPI:** Use correct type for `editMessage` (#9399) ([0a1701b](https://github.com/discordjs/discord.js/commit/0a1701b0463919a895c518e5daa9836760d9b6cf))
|
||||
|
||||
# [@discordjs/core@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/core@0.6.0...@discordjs/core@1.0.0) - (2023-07-31)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/core
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/core",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "A thinly abstracted wrapper around the rest API, and gateway.",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -59,26 +59,26 @@
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "^3.5.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "^0.37.50"
|
||||
"discord-api-types": "0.37.50"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "18.17.1",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [create-discord-bot@0.2.1](https://github.com/discordjs/discord.js/compare/create-discord-bot@0.2.0...create-discord-bot@0.2.1) - (2023-08-17)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **create-discord-bot:** Add shebang in main file (#9747) ([99194fc](https://github.com/discordjs/discord.js/commit/99194fc2703988693264ef4a7c2d7bb040c39fa8))
|
||||
|
||||
# [create-discord-bot@0.2.0](https://github.com/discordjs/discord.js/compare/create-discord-bot@0.1.0...create-discord-bot@0.2.0) - (2023-07-31)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "create-discord-bot",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "A simple way to create a startup Discord bot.",
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
@@ -52,19 +52,19 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/prompts": "^2.4.4",
|
||||
"@types/validate-npm-package-name": "^4.0.0",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.16.0"
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// eslint-disable-next-line n/shebang
|
||||
import { cp, stat, mkdir, readdir, readFile, writeFile } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import process from 'node:process';
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// eslint-disable-next-line n/shebang
|
||||
import { program } from 'commander';
|
||||
import prompts from 'prompts';
|
||||
import { createDiscordBot } from './create-discord-bot.js';
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@ discord.js is a powerful [Node.js](https://nodejs.org) module that allows you to
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install discord.js
|
||||
|
||||
@@ -58,19 +58,19 @@
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "^3.5.1",
|
||||
"@types/ws": "^8.5.5",
|
||||
"discord-api-types": "^0.37.50",
|
||||
"discord-api-types": "0.37.50",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"lodash.snakecase": "^4.1.1",
|
||||
"tslib": "^2.6.1",
|
||||
"undici": "^5.22.1",
|
||||
"undici": "5.22.1",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/docgen": "workspace:^",
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@types/node": "16.18.39",
|
||||
"@types/node": "16.18.40",
|
||||
"dtslint": "^4.2.1",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"jest": "^29.6.2",
|
||||
"prettier": "^2.8.8",
|
||||
@@ -80,6 +80,6 @@
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -253,6 +253,23 @@ class Client extends BaseClient {
|
||||
this.rest.setToken(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Options used for deleting a webhook.
|
||||
* @typedef {Object} WebhookDeleteOptions
|
||||
* @property {string} [token] Token of the webhook
|
||||
* @property {string} [reason] The reason for deleting the webhook
|
||||
*/
|
||||
|
||||
/**
|
||||
* Deletes a webhook.
|
||||
* @param {Snowflake} id The webhook's id
|
||||
* @param {WebhookDeleteOptions} [options] Options for deleting the webhook
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async deleteWebhook(id, { token, reason } = {}) {
|
||||
await this.rest.delete(Routes.webhook(id, token), { auth: !token, reason });
|
||||
}
|
||||
|
||||
/**
|
||||
* Options used when fetching an invite from Discord.
|
||||
* @typedef {Object} ClientFetchInviteOptions
|
||||
|
||||
@@ -28,20 +28,24 @@ class GenericAction {
|
||||
}
|
||||
|
||||
getChannel(data) {
|
||||
const payloadData = {};
|
||||
const id = data.channel_id ?? data.id;
|
||||
|
||||
if ('recipients' in data) {
|
||||
payloadData.recipients = data.recipients;
|
||||
} else {
|
||||
// Try to resolve the recipient, but do not add the client user.
|
||||
const recipient = data.author ?? data.user ?? { id: data.user_id };
|
||||
if (recipient.id !== this.client.user.id) payloadData.recipients = [recipient];
|
||||
}
|
||||
|
||||
if (id !== undefined) payloadData.id = id;
|
||||
if ('guild_id' in data) payloadData.guild_id = data.guild_id;
|
||||
if ('last_message_id' in data) payloadData.last_message_id = data.last_message_id;
|
||||
|
||||
return (
|
||||
data[this.client.actions.injectedChannel] ??
|
||||
this.getPayload(
|
||||
{
|
||||
id,
|
||||
guild_id: data.guild_id,
|
||||
recipients: data.recipients ?? [data.author ?? data.user ?? { id: data.user_id }],
|
||||
last_message_id: data.last_message_id,
|
||||
},
|
||||
this.client.channels,
|
||||
id,
|
||||
Partials.Channel,
|
||||
)
|
||||
this.getPayload(payloadData, this.client.channels, id, Partials.Channel)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,36 @@
|
||||
'use strict';
|
||||
|
||||
const process = require('node:process');
|
||||
const Action = require('./Action');
|
||||
const Events = require('../../util/Events');
|
||||
|
||||
let deprecationEmitted = false;
|
||||
|
||||
class WebhooksUpdate extends Action {
|
||||
handle(data) {
|
||||
const client = this.client;
|
||||
const channel = client.channels.cache.get(data.channel_id);
|
||||
if (!channel) return;
|
||||
|
||||
// TODO: change to Events.WebhooksUpdate in the next major version
|
||||
/**
|
||||
* Emitted whenever a channel has its webhooks changed.
|
||||
* @event Client#webhooksUpdate
|
||||
* @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel} channel
|
||||
* The channel that had a webhook update
|
||||
*/
|
||||
client.emit('webhooksUpdate', channel);
|
||||
|
||||
/**
|
||||
* Emitted whenever a channel has its webhooks changed.
|
||||
* @event Client#webhookUpdate
|
||||
* @param {TextChannel|NewsChannel|VoiceChannel|StageChannel|ForumChannel} channel
|
||||
* The channel that had a webhook update
|
||||
* @deprecated Use {@link Client#event:webhooksUpdate} instead.
|
||||
*/
|
||||
if (channel) client.emit(Events.WebhooksUpdate, channel);
|
||||
if (client.emit('webhookUpdate', channel) && !deprecationEmitted) {
|
||||
deprecationEmitted = true;
|
||||
process.emitWarning('The webhookUpdate event is deprecated. Use webhooksUpdate instead.', 'DeprecationWarning');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ exports.DiscordjsErrorCodes = require('./errors/ErrorCodes');
|
||||
// Utilities
|
||||
exports.ActivityFlagsBitField = require('./util/ActivityFlagsBitField');
|
||||
exports.ApplicationFlagsBitField = require('./util/ApplicationFlagsBitField');
|
||||
exports.AttachmentFlagsBitField = require('./util/AttachmentFlagsBitField');
|
||||
exports.BaseManager = require('./managers/BaseManager');
|
||||
exports.BitField = require('./util/BitField');
|
||||
exports.ChannelFlagsBitField = require('./util/ChannelFlagsBitField');
|
||||
@@ -35,6 +36,7 @@ exports.MessageFlagsBitField = require('./util/MessageFlagsBitField');
|
||||
exports.Options = require('./util/Options');
|
||||
exports.Partials = require('./util/Partials');
|
||||
exports.PermissionsBitField = require('./util/PermissionsBitField');
|
||||
exports.RoleFlagsBitField = require('./util/RoleFlagsBitField');
|
||||
exports.ShardEvents = require('./util/ShardEvents');
|
||||
exports.Status = require('./util/Status');
|
||||
exports.SnowflakeUtil = require('@sapphire/snowflake').DiscordSnowflake;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const DataManager = require('./DataManager');
|
||||
const { MakeCacheOverrideSymbol } = require('../util/Symbols');
|
||||
|
||||
/**
|
||||
* Manages the API methods of a data model with a mutable cache of instances.
|
||||
@@ -18,7 +19,13 @@ class CachedManager extends DataManager {
|
||||
* @readonly
|
||||
* @name CachedManager#_cache
|
||||
*/
|
||||
Object.defineProperty(this, '_cache', { value: this.client.options.makeCache(this.constructor, this.holds) });
|
||||
Object.defineProperty(this, '_cache', {
|
||||
value: this.client.options.makeCache(
|
||||
this.constructor[MakeCacheOverrideSymbol] ?? this.constructor,
|
||||
this.holds,
|
||||
this.constructor,
|
||||
),
|
||||
});
|
||||
|
||||
if (iterable) {
|
||||
for (const item of iterable) {
|
||||
|
||||
@@ -45,8 +45,9 @@ class GuildInviteManager extends CachedManager {
|
||||
* * VoiceChannel
|
||||
* * NewsChannel
|
||||
* * StageChannel
|
||||
* * ForumChannel
|
||||
* * Snowflake
|
||||
* @typedef {TextChannel|VoiceChannel|NewsChannel|StageChannel|Snowflake}
|
||||
* @typedef {TextChannel|VoiceChannel|NewsChannel|StageChannel|ForumChannel|Snowflake}
|
||||
* GuildInvitableChannelResolvable
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ const CachedManager = require('./CachedManager');
|
||||
const { DiscordjsTypeError, ErrorCodes } = require('../errors');
|
||||
const { Message } = require('../structures/Message');
|
||||
const MessagePayload = require('../structures/MessagePayload');
|
||||
const { MakeCacheOverrideSymbol } = require('../util/Symbols');
|
||||
const { resolvePartialEmoji } = require('../util/Util');
|
||||
|
||||
/**
|
||||
@@ -15,6 +16,8 @@ const { resolvePartialEmoji } = require('../util/Util');
|
||||
* @abstract
|
||||
*/
|
||||
class MessageManager extends CachedManager {
|
||||
static [MakeCacheOverrideSymbol] = MessageManager;
|
||||
|
||||
constructor(channel, iterable) {
|
||||
super(channel.client, Message, iterable);
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@ const { Routes } = require('discord-api-types/v10');
|
||||
const CachedManager = require('./CachedManager');
|
||||
const { DiscordjsTypeError, ErrorCodes } = require('../errors');
|
||||
const ThreadChannel = require('../structures/ThreadChannel');
|
||||
const { MakeCacheOverrideSymbol } = require('../util/Symbols');
|
||||
|
||||
/**
|
||||
* Manages API methods for thread-based channels and stores their cache.
|
||||
* @extends {CachedManager}
|
||||
*/
|
||||
class ThreadManager extends CachedManager {
|
||||
static [MakeCacheOverrideSymbol] = ThreadManager;
|
||||
|
||||
constructor(channel, iterable) {
|
||||
super(channel.client, ThreadChannel, iterable);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const AttachmentFlagsBitField = require('../util/AttachmentFlagsBitField.js');
|
||||
const { basename, flatten } = require('../util/Util');
|
||||
|
||||
/**
|
||||
@@ -121,6 +122,16 @@ class Attachment {
|
||||
} else {
|
||||
this.waveform ??= null;
|
||||
}
|
||||
|
||||
if ('flags' in data) {
|
||||
/**
|
||||
* The flags of this attachment
|
||||
* @type {Readonly<AttachmentFlagsBitField>}
|
||||
*/
|
||||
this.flags = new AttachmentFlagsBitField(data.flags).freeze();
|
||||
} else {
|
||||
this.flags ??= new AttachmentFlagsBitField().freeze();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,7 @@ const PermissionsBitField = require('../util/PermissionsBitField');
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents a Client OAuth2 Application.
|
||||
* Represents a client application.
|
||||
* @extends {Application}
|
||||
*/
|
||||
class ClientApplication extends Application {
|
||||
@@ -69,6 +69,26 @@ class ClientApplication extends Application {
|
||||
this.flags = new ApplicationFlagsBitField(data.flags).freeze();
|
||||
}
|
||||
|
||||
if ('approximate_guild_count' in data) {
|
||||
/**
|
||||
* An approximate amount of guilds this application is in.
|
||||
* @type {?number}
|
||||
*/
|
||||
this.approximateGuildCount = data.approximate_guild_count;
|
||||
} else {
|
||||
this.approximateGuildCount ??= null;
|
||||
}
|
||||
|
||||
if ('guild_id' in data) {
|
||||
/**
|
||||
* The id of the guild associated with this application.
|
||||
* @type {?Snowflake}
|
||||
*/
|
||||
this.guildId = data.guild_id;
|
||||
} else {
|
||||
this.guildId ??= null;
|
||||
}
|
||||
|
||||
if ('cover_image' in data) {
|
||||
/**
|
||||
* The hash of the application's cover image
|
||||
@@ -130,6 +150,15 @@ class ClientApplication extends Application {
|
||||
: this.owner ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The guild associated with this application.
|
||||
* @type {?Guild}
|
||||
* @readonly
|
||||
*/
|
||||
get guild() {
|
||||
return this.client.guilds.cache.get(this.guildId) ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this application is partial
|
||||
* @type {boolean}
|
||||
@@ -144,8 +173,8 @@ class ClientApplication extends Application {
|
||||
* @returns {Promise<ClientApplication>}
|
||||
*/
|
||||
async fetch() {
|
||||
const app = await this.client.rest.get(Routes.oauth2CurrentApplication());
|
||||
this._patch(app);
|
||||
const data = await this.client.rest.get(Routes.currentApplication());
|
||||
this._patch(data);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const { GatewayOpcodes } = require('discord-api-types/v10');
|
||||
const { GatewayOpcodes, ActivityType } = require('discord-api-types/v10');
|
||||
const { Presence } = require('./Presence');
|
||||
const { DiscordjsTypeError, ErrorCodes } = require('../errors');
|
||||
|
||||
@@ -51,11 +51,18 @@ class ClientPresence extends Presence {
|
||||
if (typeof activity.name !== 'string') {
|
||||
throw new DiscordjsTypeError(ErrorCodes.InvalidType, `activities[${i}].name`, 'string');
|
||||
}
|
||||
activity.type ??= 0;
|
||||
|
||||
activity.type ??= ActivityType.Playing;
|
||||
|
||||
if (activity.type === ActivityType.Custom && !activity.state) {
|
||||
activity.state = activity.name;
|
||||
activity.name = 'Custom Status';
|
||||
}
|
||||
|
||||
data.activities.push({
|
||||
type: activity.type,
|
||||
name: activity.name,
|
||||
state: activity.state,
|
||||
url: activity.url,
|
||||
});
|
||||
}
|
||||
@@ -63,6 +70,7 @@ class ClientPresence extends Presence {
|
||||
data.activities.push(
|
||||
...this.activities.map(a => ({
|
||||
name: a.name,
|
||||
state: a.state ?? undefined,
|
||||
type: a.type,
|
||||
url: a.url ?? undefined,
|
||||
})),
|
||||
|
||||
@@ -98,7 +98,8 @@ class ClientUser extends User {
|
||||
/**
|
||||
* Options for setting activities
|
||||
* @typedef {Object} ActivitiesOptions
|
||||
* @property {string} [name] Name of the activity
|
||||
* @property {string} name Name of the activity
|
||||
* @property {string} [state] State of the activity
|
||||
* @property {ActivityType} [type] Type of the activity
|
||||
* @property {string} [url] Twitch / YouTube stream URL
|
||||
*/
|
||||
@@ -149,7 +150,8 @@ class ClientUser extends User {
|
||||
/**
|
||||
* Options for setting an activity.
|
||||
* @typedef {Object} ActivityOptions
|
||||
* @property {string} [name] Name of the activity
|
||||
* @property {string} name Name of the activity
|
||||
* @property {string} [state] State of the activity
|
||||
* @property {string} [url] Twitch / YouTube stream URL
|
||||
* @property {ActivityType} [type] Type of the activity
|
||||
* @property {number|number[]} [shardId] Shard Id(s) to have the activity set on
|
||||
@@ -157,7 +159,7 @@ class ClientUser extends User {
|
||||
|
||||
/**
|
||||
* Sets the activity the client user is playing.
|
||||
* @param {string|ActivityOptions} [name] Activity being played, or options for setting the activity
|
||||
* @param {string|ActivityOptions} name Activity being played, or options for setting the activity
|
||||
* @param {ActivityOptions} [options] Options for setting the activity
|
||||
* @returns {ClientPresence}
|
||||
* @example
|
||||
|
||||
@@ -38,7 +38,7 @@ class DMChannel extends BaseChannel {
|
||||
*/
|
||||
this.recipientId = recipient.id;
|
||||
|
||||
if ('username' in recipient || this.client.options.partials.includes(Partials.Users)) {
|
||||
if ('username' in recipient || this.client.options.partials.includes(Partials.User)) {
|
||||
this.client.users._add(recipient);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ class EmbedBuilder extends BuildersEmbed {
|
||||
/**
|
||||
* The accumulated length for the embed title, description, fields, footer text, and author name.
|
||||
* @type {number}
|
||||
* @readonly
|
||||
*/
|
||||
get length() {
|
||||
return embedLength(this.data);
|
||||
|
||||
@@ -5,6 +5,7 @@ const { PermissionFlagsBits } = require('discord-api-types/v10');
|
||||
const Base = require('./Base');
|
||||
const { DiscordjsError, ErrorCodes } = require('../errors');
|
||||
const PermissionsBitField = require('../util/PermissionsBitField');
|
||||
const RoleFlagsBitField = require('../util/RoleFlagsBitField');
|
||||
|
||||
/**
|
||||
* Represents a role on Discord.
|
||||
@@ -101,6 +102,16 @@ class Role extends Base {
|
||||
|
||||
if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;
|
||||
|
||||
if ('flags' in data) {
|
||||
/**
|
||||
* The flags of this role
|
||||
* @type {Readonly<RoleFlagsBitField>}
|
||||
*/
|
||||
this.flags = new RoleFlagsBitField(data.flags).freeze();
|
||||
} else {
|
||||
this.flags ??= new RoleFlagsBitField().freeze();
|
||||
}
|
||||
|
||||
/**
|
||||
* The tags this role has
|
||||
* @type {?Object}
|
||||
|
||||
@@ -264,7 +264,8 @@ class Webhook {
|
||||
* @typedef {Object} WebhookEditOptions
|
||||
* @property {string} [name=this.name] The new name for the webhook
|
||||
* @property {?(BufferResolvable)} [avatar] The new avatar for the webhook
|
||||
* @property {GuildTextChannelResolvable} [channel] The new channel for the webhook
|
||||
* @property {GuildTextChannelResolvable|VoiceChannel|StageChannel|ForumChannel} [channel]
|
||||
* The new channel for the webhook
|
||||
* @property {string} [reason] Reason for editing the webhook
|
||||
*/
|
||||
|
||||
@@ -366,11 +367,8 @@ class Webhook {
|
||||
* @param {string} [reason] Reason for deleting this webhook
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async delete(reason) {
|
||||
await this.client.rest.delete(Routes.webhook(this.id, this.token), {
|
||||
reason,
|
||||
auth: !this.token,
|
||||
});
|
||||
delete(reason) {
|
||||
return this.client.deleteWebhook(this.id, { token: this.token, reason });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,6 +210,11 @@
|
||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/ApplicationRoleConnectionMetadataType}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external AttachmentFlags
|
||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AttachmentFlags}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external AutoModerationActionType
|
||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/AutoModerationActionType}
|
||||
@@ -405,6 +410,11 @@
|
||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-payloads/common#PermissionFlagsBits}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external RoleFlags
|
||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10/enum/RoleFlags}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @external RESTGetAPIGuildThreadsResult
|
||||
* @see {@link https://discord-api-types.dev/api/discord-api-types-v10#RESTGetAPIGuildThreadsResult}
|
||||
|
||||
26
packages/discord.js/src/util/AttachmentFlagsBitField.js
Normal file
26
packages/discord.js/src/util/AttachmentFlagsBitField.js
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
const { AttachmentFlags } = require('discord-api-types/v10');
|
||||
const BitField = require('./BitField');
|
||||
|
||||
/**
|
||||
* Data structure that makes it easy to interact with an {@link Attachment#flags} bitfield.
|
||||
* @extends {BitField}
|
||||
*/
|
||||
class AttachmentFlagsBitField extends BitField {
|
||||
/**
|
||||
* Numeric attachment flags.
|
||||
* @type {AttachmentFlags}
|
||||
* @memberof AttachmentFlagsBitField
|
||||
*/
|
||||
static Flags = AttachmentFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name AttachmentFlagsBitField
|
||||
* @kind constructor
|
||||
* @memberof AttachmentFlagsBitField
|
||||
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from
|
||||
*/
|
||||
|
||||
module.exports = AttachmentFlagsBitField;
|
||||
@@ -4,10 +4,12 @@ const { DefaultRestOptions, DefaultUserAgentAppendix } = require('@discordjs/res
|
||||
const { toSnakeCase } = require('./Transformers');
|
||||
const { version } = require('../../package.json');
|
||||
|
||||
// TODO(ckohen): switch order of params so full manager is first and "type" is optional
|
||||
/**
|
||||
* @typedef {Function} CacheFactory
|
||||
* @param {Function} manager The manager class the cache is being requested from.
|
||||
* @param {Function} managerType The base manager class the cache is being requested from.
|
||||
* @param {Function} holds The class that the cache will hold.
|
||||
* @param {Function} manager The fully extended manager class the cache is being requested from.
|
||||
* @returns {Collection} A Collection used to store the cache of the manager.
|
||||
*/
|
||||
|
||||
@@ -150,8 +152,8 @@ class Options extends null {
|
||||
const { Collection } = require('@discordjs/collection');
|
||||
const LimitedCollection = require('./LimitedCollection');
|
||||
|
||||
return manager => {
|
||||
const setting = settings[manager.name];
|
||||
return (managerType, _, manager) => {
|
||||
const setting = settings[manager.name] ?? settings[managerType.name];
|
||||
/* eslint-disable-next-line eqeqeq */
|
||||
if (setting == null) {
|
||||
return new Collection();
|
||||
|
||||
26
packages/discord.js/src/util/RoleFlagsBitField.js
Normal file
26
packages/discord.js/src/util/RoleFlagsBitField.js
Normal file
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
const { RoleFlags } = require('discord-api-types/v10');
|
||||
const BitField = require('./BitField');
|
||||
|
||||
/**
|
||||
* Data structure that makes it easy to interact with a {@link Role#flags} bitfield.
|
||||
* @extends {BitField}
|
||||
*/
|
||||
class RoleFlagsBitField extends BitField {
|
||||
/**
|
||||
* Numeric role flags.
|
||||
* @type {RoleFlags}
|
||||
* @memberof RoleFlagsBitField
|
||||
*/
|
||||
static Flags = RoleFlags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @name RoleFlagsBitField
|
||||
* @kind constructor
|
||||
* @memberof RoleFlagsBitField
|
||||
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from
|
||||
*/
|
||||
|
||||
module.exports = RoleFlagsBitField;
|
||||
3
packages/discord.js/src/util/Symbols.js
Normal file
3
packages/discord.js/src/util/Symbols.js
Normal file
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
exports.MakeCacheOverrideSymbol = Symbol('djs.managers.makeCacheOverride');
|
||||
64
packages/discord.js/typings/index.d.ts
vendored
64
packages/discord.js/typings/index.d.ts
vendored
@@ -166,6 +166,8 @@ import {
|
||||
APIGuildOnboardingPrompt,
|
||||
APIGuildOnboardingPromptOption,
|
||||
GuildOnboardingPromptType,
|
||||
AttachmentFlags,
|
||||
RoleFlags,
|
||||
} from 'discord-api-types/v10';
|
||||
import { ChildProcess } from 'node:child_process';
|
||||
import { EventEmitter } from 'node:events';
|
||||
@@ -967,6 +969,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
||||
public voice: ClientVoiceManager;
|
||||
public ws: WebSocketManager;
|
||||
public destroy(): Promise<void>;
|
||||
public deleteWebhook(id: Snowflake, options?: WebhookDeleteOptions): Promise<void>;
|
||||
public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
|
||||
public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
|
||||
public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
|
||||
@@ -1010,8 +1013,11 @@ export class ClientApplication extends Application {
|
||||
public botPublic: boolean | null;
|
||||
public botRequireCodeGrant: boolean | null;
|
||||
public commands: ApplicationCommandManager;
|
||||
public guildId: Snowflake | null;
|
||||
public get guild(): Guild | null;
|
||||
public cover: string | null;
|
||||
public flags: Readonly<ApplicationFlagsBitField>;
|
||||
public approximateGuildCount: number | null;
|
||||
public tags: string[];
|
||||
public installParams: ClientApplicationInstallParams | null;
|
||||
public customInstallURL: string | null;
|
||||
@@ -1039,7 +1045,7 @@ export class ClientUser extends User {
|
||||
public verified: boolean;
|
||||
public edit(options: ClientUserEditOptions): Promise<this>;
|
||||
public setActivity(options?: ActivityOptions): ClientPresence;
|
||||
public setActivity(name: string, options?: ActivityOptions): ClientPresence;
|
||||
public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence;
|
||||
public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
|
||||
public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
|
||||
public setPresence(data: PresenceData): ClientPresence;
|
||||
@@ -2070,6 +2076,7 @@ export class Attachment {
|
||||
public description: string | null;
|
||||
public duration: number | null;
|
||||
public ephemeral: boolean;
|
||||
public flags: AttachmentFlagsBitField;
|
||||
public height: number | null;
|
||||
public id: Snowflake;
|
||||
public name: string;
|
||||
@@ -2082,6 +2089,13 @@ export class Attachment {
|
||||
public toJSON(): unknown;
|
||||
}
|
||||
|
||||
export type AttachmentFlagsString = keyof typeof AttachmentFlags;
|
||||
|
||||
export class AttachmentFlagsBitField extends BitField<AttachmentFlagsString> {
|
||||
public static Flags: Record<AttachmentFlagsString, number>;
|
||||
public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number;
|
||||
}
|
||||
|
||||
export class MessageCollector extends Collector<Snowflake, Message, [Collection<Snowflake, Message>]> {
|
||||
public constructor(channel: TextBasedChannel, options?: MessageCollectorOptions);
|
||||
private _handleChannelDeletion(channel: NonThreadGuildBasedChannel): void;
|
||||
@@ -2515,6 +2529,7 @@ export class Role extends Base {
|
||||
public get createdAt(): Date;
|
||||
public get createdTimestamp(): number;
|
||||
public get editable(): boolean;
|
||||
public flags: RoleFlagsBitField;
|
||||
public guild: Guild;
|
||||
public get hexColor(): HexColorString;
|
||||
public hoist: boolean;
|
||||
@@ -2550,6 +2565,13 @@ export class Role extends Base {
|
||||
public toString(): RoleMention;
|
||||
}
|
||||
|
||||
export type RoleFlagsString = keyof typeof RoleFlags;
|
||||
|
||||
export class RoleFlagsBitField extends BitField<RoleFlagsString> {
|
||||
public static Flags: typeof RoleFlags;
|
||||
public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number;
|
||||
}
|
||||
|
||||
export class StringSelectMenuInteraction<
|
||||
Cached extends CacheType = CacheType,
|
||||
> extends MessageComponentInteraction<Cached> {
|
||||
@@ -3716,7 +3738,7 @@ export abstract class DataManager<K, Holds, R> extends BaseManager {
|
||||
}
|
||||
|
||||
export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R> {
|
||||
protected constructor(client: Client<true>, holds: Constructable<Holds>);
|
||||
protected constructor(client: Client<true>, holds: Constructable<Holds>, iterable?: Iterable<Holds>);
|
||||
private readonly _cache: Collection<K, Holds>;
|
||||
private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds;
|
||||
}
|
||||
@@ -4301,9 +4323,10 @@ export interface WebhookFields extends PartialWebhookFields {
|
||||
export type ActivitiesOptions = Omit<ActivityOptions, 'shardId'>;
|
||||
|
||||
export interface ActivityOptions {
|
||||
name?: string;
|
||||
name: string;
|
||||
state?: string;
|
||||
url?: string;
|
||||
type?: Exclude<ActivityType, ActivityType.Custom>;
|
||||
type?: ActivityType;
|
||||
shardId?: number | readonly number[];
|
||||
}
|
||||
|
||||
@@ -4699,17 +4722,19 @@ export interface Caches {
|
||||
AutoModerationRuleManager: [manager: typeof AutoModerationRuleManager, holds: typeof AutoModerationRule];
|
||||
ApplicationCommandManager: [manager: typeof ApplicationCommandManager, holds: typeof ApplicationCommand];
|
||||
BaseGuildEmojiManager: [manager: typeof BaseGuildEmojiManager, holds: typeof GuildEmoji];
|
||||
DMMessageManager: [manager: typeof MessageManager, holds: typeof Message<false>];
|
||||
GuildEmojiManager: [manager: typeof GuildEmojiManager, holds: typeof GuildEmoji];
|
||||
// TODO: ChannelManager: [manager: typeof ChannelManager, holds: typeof Channel];
|
||||
// TODO: GuildChannelManager: [manager: typeof GuildChannelManager, holds: typeof GuildChannel];
|
||||
// TODO: GuildManager: [manager: typeof GuildManager, holds: typeof Guild];
|
||||
GuildMemberManager: [manager: typeof GuildMemberManager, holds: typeof GuildMember];
|
||||
GuildBanManager: [manager: typeof GuildBanManager, holds: typeof GuildBan];
|
||||
GuildForumThreadManager: [manager: typeof GuildForumThreadManager, holds: typeof ThreadChannel];
|
||||
GuildForumThreadManager: [manager: typeof GuildForumThreadManager, holds: typeof ThreadChannel<true>];
|
||||
GuildInviteManager: [manager: typeof GuildInviteManager, holds: typeof Invite];
|
||||
GuildMessageManager: [manager: typeof GuildMessageManager, holds: typeof Message<true>];
|
||||
GuildScheduledEventManager: [manager: typeof GuildScheduledEventManager, holds: typeof GuildScheduledEvent];
|
||||
GuildStickerManager: [manager: typeof GuildStickerManager, holds: typeof Sticker];
|
||||
GuildTextThreadManager: [manager: typeof GuildTextThreadManager, holds: typeof ThreadChannel];
|
||||
GuildTextThreadManager: [manager: typeof GuildTextThreadManager, holds: typeof ThreadChannel<false>];
|
||||
MessageManager: [manager: typeof MessageManager, holds: typeof Message];
|
||||
// TODO: PermissionOverwriteManager: [manager: typeof PermissionOverwriteManager, holds: typeof PermissionOverwrites];
|
||||
PresenceManager: [manager: typeof PresenceManager, holds: typeof Presence];
|
||||
@@ -4727,11 +4752,18 @@ export type CacheConstructors = {
|
||||
[K in keyof Caches]: Caches[K][0] & { name: K };
|
||||
};
|
||||
|
||||
type OverriddenCaches =
|
||||
| 'DMMessageManager'
|
||||
| 'GuildForumThreadManager'
|
||||
| 'GuildMessageManager'
|
||||
| 'GuildTextThreadManager';
|
||||
|
||||
// This doesn't actually work the way it looks 😢.
|
||||
// Narrowing the type of `manager.name` doesn't propagate type information to `holds` and the return type.
|
||||
export type CacheFactory = (
|
||||
manager: CacheConstructors[keyof Caches],
|
||||
managerType: CacheConstructors[Exclude<keyof Caches, OverriddenCaches>],
|
||||
holds: Caches[(typeof manager)['name']][1],
|
||||
manager: CacheConstructors[keyof Caches],
|
||||
) => (typeof manager)['prototype'] extends DataManager<infer K, infer V, any> ? Collection<K, V> : never;
|
||||
|
||||
export type CacheWithLimitsOptions = {
|
||||
@@ -4861,7 +4893,9 @@ export interface ClientEvents {
|
||||
typingStart: [typing: Typing];
|
||||
userUpdate: [oldUser: User | PartialUser, newUser: User];
|
||||
voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
|
||||
webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel];
|
||||
/** @deprecated Use {@link webhooksUpdate} instead. */
|
||||
webhookUpdate: ClientEvents['webhooksUpdate'];
|
||||
webhooksUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel];
|
||||
interactionCreate: [interaction: Interaction];
|
||||
shardDisconnect: [closeEvent: CloseEvent, shardId: number];
|
||||
shardError: [error: Error, shardId: number];
|
||||
@@ -5764,7 +5798,13 @@ export interface InviteGenerationOptions {
|
||||
scopes: OAuth2Scopes[];
|
||||
}
|
||||
|
||||
export type GuildInvitableChannelResolvable = TextChannel | VoiceChannel | NewsChannel | StageChannel | Snowflake;
|
||||
export type GuildInvitableChannelResolvable =
|
||||
| TextChannel
|
||||
| VoiceChannel
|
||||
| NewsChannel
|
||||
| StageChannel
|
||||
| ForumChannel
|
||||
| Snowflake;
|
||||
|
||||
export interface InviteCreateOptions {
|
||||
temporary?: boolean;
|
||||
@@ -5807,6 +5847,7 @@ export interface MessageActivity {
|
||||
}
|
||||
|
||||
export interface BaseButtonComponentData extends BaseComponentData {
|
||||
type: ComponentType.Button;
|
||||
style: ButtonStyle;
|
||||
disabled?: boolean;
|
||||
emoji?: ComponentEmojiResolvable;
|
||||
@@ -6363,6 +6404,11 @@ export interface WebhookClientDataURL {
|
||||
|
||||
export type WebhookClientOptions = Pick<ClientOptions, 'allowedMentions' | 'rest'>;
|
||||
|
||||
export interface WebhookDeleteOptions {
|
||||
token?: string;
|
||||
reason?: string;
|
||||
}
|
||||
|
||||
export interface WebhookEditOptions {
|
||||
name?: string;
|
||||
avatar?: BufferResolvable | null;
|
||||
|
||||
@@ -174,6 +174,8 @@ import {
|
||||
ChatInputApplicationCommandData,
|
||||
ApplicationCommandPermissionsManager,
|
||||
GuildOnboarding,
|
||||
StringSelectMenuComponentData,
|
||||
ButtonComponentData,
|
||||
} from '.';
|
||||
import { expectAssignable, expectNotAssignable, expectNotType, expectType } from 'tsd';
|
||||
import type { ContextMenuCommandBuilder, SlashCommandBuilder } from '@discordjs/builders';
|
||||
@@ -532,10 +534,10 @@ client.on('messageCreate', async message => {
|
||||
|
||||
// Check that both builders and builder data can be sent in messages
|
||||
const row = new ActionRowBuilder<MessageActionRowComponentBuilder>();
|
||||
const buttonsRow: ActionRowData<MessageActionRowComponentData> = {
|
||||
|
||||
const rawButtonsRow: ActionRowData<ButtonComponentData> = {
|
||||
type: ComponentType.ActionRow,
|
||||
components: [
|
||||
new ButtonBuilder(),
|
||||
{ type: ComponentType.Button, label: 'test', style: ButtonStyle.Primary, customId: 'test' },
|
||||
{
|
||||
type: ComponentType.Button,
|
||||
@@ -545,21 +547,34 @@ client.on('messageCreate', async message => {
|
||||
},
|
||||
],
|
||||
};
|
||||
const selectsRow: ActionRowData<MessageActionRowComponentData> = {
|
||||
|
||||
const buttonsRow: ActionRowData<ButtonBuilder> = {
|
||||
type: ComponentType.ActionRow,
|
||||
components: [new ButtonBuilder()],
|
||||
};
|
||||
|
||||
const rawStringSelectMenuRow: ActionRowData<StringSelectMenuComponentData> = {
|
||||
type: ComponentType.ActionRow,
|
||||
components: [
|
||||
new StringSelectMenuBuilder(),
|
||||
{
|
||||
type: ComponentType.StringSelect,
|
||||
label: 'select menu',
|
||||
options: [{ label: 'test', value: 'test' }],
|
||||
customId: 'test',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const stringSelectRow: ActionRowData<StringSelectMenuBuilder> = {
|
||||
type: ComponentType.ActionRow,
|
||||
components: [new StringSelectMenuBuilder()],
|
||||
};
|
||||
|
||||
const embedData = { description: 'test', color: 0xff0000 };
|
||||
channel.send({ components: [row, buttonsRow, selectsRow], embeds: [embed, embedData] });
|
||||
|
||||
channel.send({
|
||||
components: [row, rawButtonsRow, buttonsRow, rawStringSelectMenuRow, stringSelectRow],
|
||||
embeds: [embed, embedData],
|
||||
});
|
||||
});
|
||||
|
||||
client.on('messageDelete', ({ client }) => expectType<Client<true>>(client));
|
||||
@@ -1170,7 +1185,7 @@ client.on('voiceStateUpdate', ({ client: oldClient }, { client: newClient }) =>
|
||||
expectType<Client<true>>(newClient);
|
||||
});
|
||||
|
||||
client.on('webhookUpdate', ({ client }) => expectType<Client<true>>(client));
|
||||
client.on('webhooksUpdate', ({ client }) => expectType<Client<true>>(client));
|
||||
|
||||
client.on('guildCreate', async g => {
|
||||
expectType<Client<true>>(g.client);
|
||||
|
||||
@@ -49,18 +49,18 @@
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@types/jsdoc-to-markdown": "^7.0.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@types/node": "16.18.40",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,19 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/formatters@0.3.2](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.1...@discordjs/formatters@0.3.2) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/formatters@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.0...@discordjs/formatters@0.3.1) - (2023-05-01)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
- **formatters:** Enhance the documentation (#9364) ([23e0ac5](https://github.com/discordjs/discord.js/commit/23e0ac56f456c39d925e2644ec3ca209d4410a99))
|
||||
|
||||
# [@discordjs/formatters@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/formatters@0.3.0...@discordjs/formatters@0.3.1) - (2023-05-01)
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/formatters
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/formatters",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"description": "A set of functions to format strings for Discord.",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -46,25 +46,25 @@
|
||||
},
|
||||
"homepage": "https://discord.js.org",
|
||||
"dependencies": {
|
||||
"discord-api-types": "^0.37.50"
|
||||
"discord-api-types": "0.37.50"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -60,23 +60,23 @@
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"discord-api-types": "^0.37.50"
|
||||
"discord-api-types": "0.37.50"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "18.17.1",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.13.0"
|
||||
|
||||
@@ -49,18 +49,18 @@
|
||||
"tslib": "^2.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "18.17.1",
|
||||
"@types/node": "18.17.5",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,43 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/proxy@2.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@2.0.0...@discordjs/proxy@2.0.1) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/proxy@2.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.4.1...@discordjs/proxy@2.0.0) - (2023-07-31)
|
||||
|
||||
## Refactor
|
||||
|
||||
- **REST:** Remove double classing (#9722) ([8f4256d](https://github.com/discordjs/discord.js/commit/8f4256db8a52ac08359d0b3436f41b641ac4e382))
|
||||
- **BREAKING CHANGE:** `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
|
||||
- **BREAKING CHANGE:** `REST#raw` has been removed in favor of `REST#queueRequest`
|
||||
- **BREAKING CHANGE:** `REST#getAgent` has been removed in favor of `REST#agent`
|
||||
|
||||
* chore: update for /rest changes
|
||||
- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
|
||||
- **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.
|
||||
|
||||
# [@discordjs/proxy@1.4.1](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.4.0...@discordjs/proxy@1.4.1) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
|
||||
## Refactor
|
||||
|
||||
- **proxy:** Rely on auth header instead (#9422) ([a49ed0a](https://github.com/discordjs/discord.js/commit/a49ed0a2d5934ad7af2e9cfbf7c5ccf171599591))
|
||||
|
||||
# [@discordjs/proxy@2.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.4.1...@discordjs/proxy@2.0.0) - (2023-07-31)
|
||||
|
||||
## Refactor
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/proxy
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/proxy",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Tools for running an HTTP proxy for Discord's API",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -59,27 +59,27 @@
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"tslib": "^2.6.1",
|
||||
"undici": "^5.22.1"
|
||||
"undici": "5.22.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "18.17.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"supertest": "^6.3.3",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,56 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/rest@2.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@2.0.0...@discordjs/rest@2.0.1) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/rest@2.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.1...@discordjs/rest@2.0.0) - (2023-07-31)
|
||||
|
||||
## Features
|
||||
|
||||
- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
|
||||
- **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
|
||||
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
|
||||
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
|
||||
- **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
|
||||
different platforms (previously mentioned Deno, Bun, CF Workers, etc)
|
||||
- **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
|
||||
in non-node-like environments (CF Workers, etc.)
|
||||
- **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
|
||||
- **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
|
||||
- **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
|
||||
- User avatar decorations (#8914) ([8d97017](https://github.com/discordjs/discord.js/commit/8d9701745840e23854e8f0b057d21cb10e7d1d54))
|
||||
- Support new username system (#9512) ([1ab60f9](https://github.com/discordjs/discord.js/commit/1ab60f9da4d6b7ea144fa05b97b029a4bfaeede2))
|
||||
|
||||
## Refactor
|
||||
|
||||
- **REST:** Remove double classing (#9722) ([8f4256d](https://github.com/discordjs/discord.js/commit/8f4256db8a52ac08359d0b3436f41b641ac4e382))
|
||||
- **BREAKING CHANGE:** `REST` and `RequestManager` have been combined, most of the properties, methods, and events from both classes can now be found on `REST`
|
||||
- **BREAKING CHANGE:** `REST#raw` has been removed in favor of `REST#queueRequest`
|
||||
- **BREAKING CHANGE:** `REST#getAgent` has been removed in favor of `REST#agent`
|
||||
|
||||
* chore: update for /rest changes
|
||||
- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
|
||||
- **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.
|
||||
|
||||
# [@discordjs/rest@1.7.1](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.0...@discordjs/rest@1.7.1) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Reference package names properly (#9426) ([d6bca9b](https://github.com/discordjs/discord.js/commit/d6bca9bb4d976dc069a5039250db7d5b3e9142ef))
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
|
||||
# [@discordjs/rest@2.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@1.7.1...@discordjs/rest@2.0.0) - (2023-07-31)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
Note: native fetch (not recommended) is unavailable in this node version, either use a newer node version or use the more performant `undiciRequest` strategy (default)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/rest",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "The REST API for discord.js",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -71,29 +71,29 @@
|
||||
"@sapphire/async-queue": "^1.5.0",
|
||||
"@sapphire/snowflake": "^3.5.1",
|
||||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "^0.37.50",
|
||||
"discord-api-types": "0.37.50",
|
||||
"magic-bytes.js": "^1.0.15",
|
||||
"tslib": "^2.6.1",
|
||||
"undici": "^5.22.1"
|
||||
"undici": "5.22.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "18.17.1",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -45,30 +45,30 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"dependencies": {
|
||||
"@discordjs/api-extractor-utils": "workspace:^",
|
||||
"@microsoft/api-extractor-model": "7.27.5",
|
||||
"@microsoft/api-extractor-model": "7.27.6",
|
||||
"@microsoft/tsdoc": "0.14.2",
|
||||
"@microsoft/tsdoc-config": "0.16.2",
|
||||
"commander": "^11.0.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"tslib": "^2.6.1",
|
||||
"undici": "^5.22.1",
|
||||
"undici": "5.22.1",
|
||||
"yaml": "2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ export async function generateIndex(model: ApiModel, packageName: string, tag =
|
||||
export async function generateAllIndices() {
|
||||
for (const pkg of PACKAGES) {
|
||||
const response = await request(`https://docs.discordjs.dev/api/info?package=${pkg}`);
|
||||
const versions = await response.body.json();
|
||||
const versions = (await response.body.json()) as any;
|
||||
|
||||
for (const version of versions) {
|
||||
idx = 0;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
"vitest": "^0.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -54,39 +54,39 @@
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@storybook/addon-essentials": "^7.1.1",
|
||||
"@storybook/addon-interactions": "^7.1.1",
|
||||
"@storybook/addon-links": "^7.1.1",
|
||||
"@storybook/addon-styling": "^1.3.5",
|
||||
"@storybook/blocks": "^7.1.1",
|
||||
"@storybook/react": "^7.1.1",
|
||||
"@storybook/react-vite": "^7.1.1",
|
||||
"@storybook/addon-essentials": "^7.3.1",
|
||||
"@storybook/addon-interactions": "^7.3.1",
|
||||
"@storybook/addon-links": "^7.3.1",
|
||||
"@storybook/addon-styling": "^1.3.6",
|
||||
"@storybook/blocks": "^7.3.1",
|
||||
"@storybook/react": "^7.3.1",
|
||||
"@storybook/react-vite": "^7.3.1",
|
||||
"@storybook/testing-library": "^0.2.0",
|
||||
"@types/node": "16.18.39",
|
||||
"@types/react": "^18.2.17",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@unocss/eslint-config": "^0.54.0",
|
||||
"@unocss/reset": "^0.54.0",
|
||||
"@vitejs/plugin-react": "^4.0.3",
|
||||
"@unocss/eslint-config": "^0.55.1",
|
||||
"@unocss/reset": "^0.55.1",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"chromatic": "^6.20.0",
|
||||
"chromatic": "^6.22.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"eslint-plugin-storybook": "^0.6.13",
|
||||
"prettier": "^2.8.8",
|
||||
"prop-types": "^15.8.1",
|
||||
"storybook": "^7.1.1",
|
||||
"storybook": "^7.3.1",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"unocss": "^0.54.0",
|
||||
"vite": "^4.4.7",
|
||||
"vite-plugin-dts": "^3.4.0",
|
||||
"vitest": "^0.33.0"
|
||||
"unocss": "^0.55.1",
|
||||
"vite": "^4.4.9",
|
||||
"vite-plugin-dts": "^3.5.2",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
import { resolve } from 'node:path';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import Unocss from 'unocss/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import dts from 'vite-plugin-dts';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [dts(), react(), Unocss({ include: ['.storybook/preview.ts'], configFile: '../../unocss.config.ts' })],
|
||||
plugins: [
|
||||
dts(),
|
||||
react(),
|
||||
Unocss({ content: { pipeline: { include: ['.storybook/preview.ts'] } }, configFile: '../../unocss.config.ts' }),
|
||||
],
|
||||
build: {
|
||||
lib: {
|
||||
entry: [
|
||||
|
||||
@@ -2,6 +2,49 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/util@1.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/util@1.0.0...@discordjs/util@1.0.1) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/util@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.1...@discordjs/util@1.0.0) - (2023-07-31)
|
||||
|
||||
## Features
|
||||
|
||||
- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
|
||||
- **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
|
||||
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
|
||||
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
|
||||
- **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
|
||||
different platforms (previously mentioned Deno, Bun, CF Workers, etc)
|
||||
- **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
|
||||
in non-node-like environments (CF Workers, etc.)
|
||||
- **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
|
||||
- **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
|
||||
- **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
|
||||
|
||||
# [@discordjs/util@0.3.1](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.0...@discordjs/util@0.3.1) - (2023-05-01)
|
||||
|
||||
## Refactor
|
||||
|
||||
- **ShardClientUtil:** Logic de-duplication (#9491) ([a9f2bff](https://github.com/discordjs/discord.js/commit/a9f2bff82a18c6a3afdee99e5830e1d7b4da65dc))
|
||||
|
||||
# [@discordjs/util@0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.2.0...@discordjs/util@0.3.0) - (2023-05-01)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
- **scripts:** Accessing tsComment ([d8d5f31](https://github.com/discordjs/discord.js/commit/d8d5f31d3927fd1de62f1fa3a1a6e454243ad87b))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
|
||||
## Features
|
||||
|
||||
- **website:** Render syntax and mdx on the server (#9086) ([ee5169e](https://github.com/discordjs/discord.js/commit/ee5169e0aadd7bbfcd752aae614ec0f69602b68b))
|
||||
|
||||
# [@discordjs/util@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/util@0.3.1...@discordjs/util@1.0.0) - (2023-07-31)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/util
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/util",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Utilities shared across Discord.js packages",
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
@@ -54,22 +54,22 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"tsd": "^0.28.1",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.33.0"
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/voice
|
||||
|
||||
@@ -55,35 +55,35 @@
|
||||
"homepage": "https://discord.js.org",
|
||||
"dependencies": {
|
||||
"@types/ws": "^8.5.5",
|
||||
"discord-api-types": "^0.37.50",
|
||||
"discord-api-types": "0.37.50",
|
||||
"prism-media": "^1.3.5",
|
||||
"tslib": "^2.6.1",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.9",
|
||||
"@babel/preset-env": "^7.22.9",
|
||||
"@babel/core": "^7.22.10",
|
||||
"@babel/preset-env": "^7.22.10",
|
||||
"@babel/preset-typescript": "^7.22.5",
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/jest": "^29.5.3",
|
||||
"@types/node": "16.18.39",
|
||||
"@types/node": "16.18.40",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"jest": "^29.6.2",
|
||||
"jest-websocket-mock": "^2.4.0",
|
||||
"jest-websocket-mock": "^2.4.1",
|
||||
"mock-socket": "^9.2.1",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"tweetnacl": "^1.0.3",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -2,6 +2,71 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/ws@1.0.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@1.0.0...@discordjs/ws@1.0.1) - (2023-08-17)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Update Node.js requirement to 16.11.0 (#9764) ([188877c](https://github.com/discordjs/discord.js/commit/188877c50af70f0d5cffb246620fa277435c6ce6))
|
||||
|
||||
# [@discordjs/ws@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.3...@discordjs/ws@1.0.0) - (2023-07-31)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **WebSocketShard:** Close errors not being catchable (#9704) ([8c782bf](https://github.com/discordjs/discord.js/commit/8c782bfd52b1d7bbfbf1dfd39d0c45828298e285))
|
||||
- **WebSocketManager:** Always cache result of fetchGatewayInformation (#9611) ([df8b6e9](https://github.com/discordjs/discord.js/commit/df8b6e9934af5b21aa2701ce54244c38a5f133e0))
|
||||
- **WebSocketShard:** Handle initial connect being a resume (#9549) ([4dcc9c5](https://github.com/discordjs/discord.js/commit/4dcc9c50f83cd234cb2c2ede47fb505ffb75eef2))
|
||||
|
||||
## Features
|
||||
|
||||
- No-de-no-de, now with extra buns (#9683) ([386f206](https://github.com/discordjs/discord.js/commit/386f206caf74a04c426799af9796ca96dcb37056))
|
||||
- **BREAKING CHANGE:** The REST and RequestManager classes now extend AsyncEventEmitter
|
||||
from `@vladfrangu/async_event_emitter`, which aids in cross-compatibility
|
||||
between Node, Deno, Bun, CF Workers, Vercel Functions, etc.
|
||||
- **BREAKING CHANGE:** DefaultUserAgentAppendix has been adapted to support multiple
|
||||
different platforms (previously mentioned Deno, Bun, CF Workers, etc)
|
||||
- **BREAKING CHANGE:** the entry point for `@discordjs/rest` will now differ
|
||||
in non-node-like environments (CF Workers, etc.)
|
||||
- **Co-authored-by:** Suneet Tipirneni <77477100+suneettipirneni@users.noreply.github.com>
|
||||
- **Co-authored-by:** Jiralite <33201955+Jiralite@users.noreply.github.com>
|
||||
- **Co-authored-by:** suneettipirneni <suneettipirneni@icloud.com>
|
||||
|
||||
## Refactor
|
||||
|
||||
- **WebSocketShard:** Throttling error handling (#9701) ([ceab07b](https://github.com/discordjs/discord.js/commit/ceab07bec85c8d678958b8023a9c1902136f9f83))
|
||||
- **rest:** Switch api to fetch-like and provide strategies (#9416) ([cdaa0a3](https://github.com/discordjs/discord.js/commit/cdaa0a36f586459f1e5ede868c4250c7da90455c))
|
||||
- **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.
|
||||
|
||||
# [@discordjs/ws@0.8.3](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.2...@discordjs/ws@0.8.3) - (2023-05-06)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **WebSocketShard:** Wait a little before reconnecting (#9517) ([00da44a](https://github.com/discordjs/discord.js/commit/00da44a120fb0eeb2bdc3a03670836a544dc5418))
|
||||
|
||||
## Testing
|
||||
|
||||
- **ws:** Fix tests (#9520) ([3e80f0b](https://github.com/discordjs/discord.js/commit/3e80f0b384ea2dc14c1b60b5897e90040cab9a24))
|
||||
|
||||
# [@discordjs/ws@0.8.2](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.1...@discordjs/ws@0.8.2) - (2023-05-01)
|
||||
|
||||
## Documentation
|
||||
|
||||
- Generate static imports for types with api-extractor ([98a76db](https://github.com/discordjs/discord.js/commit/98a76db482879f79d6bb2fb2e5fc65ac2c34e2d9))
|
||||
|
||||
# [@discordjs/ws@0.8.1](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.0...@discordjs/ws@0.8.1) - (2023-04-16)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Fix external links (#9313) ([a7425c2](https://github.com/discordjs/discord.js/commit/a7425c29c4f23f1b31f4c6a463107ca9eb7fd7e2))
|
||||
|
||||
## Refactor
|
||||
|
||||
- Abstract identify throttling and correct max_concurrency handling (#9375) ([02dfaf1](https://github.com/discordjs/discord.js/commit/02dfaf1aa2c798315d0dd7f809cc469771b36ffc))
|
||||
- **WebSocketShard:** WaitForEvent and its error handling (#9282) ([dcf58d8](https://github.com/discordjs/discord.js/commit/dcf58d81401387a5e157b20829aa56638e106e9d))
|
||||
|
||||
# [@discordjs/ws@1.0.0](https://github.com/discordjs/discord.js/compare/@discordjs/ws@0.8.3...@discordjs/ws@1.0.0) - (2023-07-31)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
**Node.js 16.9.0 or newer is required.**
|
||||
**Node.js 16.11.0 or newer is required.**
|
||||
|
||||
```sh
|
||||
npm install @discordjs/ws
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/ws",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Wrapper around Discord's gateway",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
@@ -67,31 +67,31 @@
|
||||
"@sapphire/async-queue": "^1.5.0",
|
||||
"@types/ws": "^8.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "^0.37.50",
|
||||
"discord-api-types": "0.37.50",
|
||||
"tslib": "^2.6.1",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.3",
|
||||
"@types/node": "18.17.1",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.46.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"mock-socket": "^9.2.1",
|
||||
"prettier": "^2.8.8",
|
||||
"tsup": "^7.1.0",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"undici": "^5.22.1",
|
||||
"vitest": "^0.33.0",
|
||||
"undici": "5.22.1",
|
||||
"vitest": "^0.34.2",
|
||||
"zlib-sync": "^0.1.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
"node": ">=16.11.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["src/**/*.ts", "vite.config.ts"],
|
||||
"outputs": ["dist/**"],
|
||||
"outputMode": "hash-only"
|
||||
"outputMode": "errors-only"
|
||||
},
|
||||
"@discordjs/guide#build:local": {
|
||||
"dependsOn": ["^build"],
|
||||
|
||||
@@ -8,7 +8,7 @@ export default defineConfig({
|
||||
enabled: true,
|
||||
all: true,
|
||||
reporter: ['text', 'lcov', 'cobertura'],
|
||||
provider: 'c8',
|
||||
provider: 'v8',
|
||||
include: ['src'],
|
||||
exclude: [
|
||||
// All ts files that only contain types, due to ALL
|
||||
|
||||
Reference in New Issue
Block a user