diff --git a/.dockerignore b/.dockerignore
index 9eb7cfdae1f5..a527010a1465 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,38 +1,67 @@
# Packages
-node_modules/
+**/node_modules
# Log files
-logs/
-*.log
-npm-debug.log*
+**/logs
+**/*.log
+**/npm-debug.log*
# Runtime data
-pids
-*.pid
-*.seed
+**/pids
+**/*.pid
+**/*.seed
# Env
-.env
+**/.env
# Dist
-dist/
+**/dist/
+**/dist-docs/
# Miscellaneous
-.tmp/
-.vscode/*
-!.vscode/extensions.json
-!.vscode/settings.json
-.idea/
-.DS_Store
-.turbo
-tsconfig.tsbuildinfo
+**/.tmp
+**/.vscode
+**/.idea
+**/.DS_Store
+**/.turbo
+**/tsconfig.tsbuildinfo
+**/coverage
+**/__tests__
+**/out
# yarn
.pnp.*
.yarn/*
-!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
+
+# Cache
+**/.prettiercache
+**/.eslintcache
+**/.vercel
+
+# Docker specific
+**/.cliff-jumperrc.json
+**/api-extractor.json
+**/api-extractor-docs.json
+**/.eslintignore
+**/.eslintrc.json
+**/.lintstagedrc.js
+**/.lintstagedrc.cjs
+**/.lintstagedrc.json
+**/.prettierignore
+**/.prettierrc.js
+**/.prettierrc.cjs
+**/.prettierrc.json
+**/cliff.toml
+**/CHANGELOG.md
+**/README.md
+**/LICENSE
+**/tsconfig.eslint.json
+**/tsconfig.docs.json
+**/docs/
+**/vitest.config.ts
+
diff --git a/.eslintrc.json b/.eslintrc.json
index fe9f20cddfe4..e29c4c5bdcf3 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -2,13 +2,10 @@
"root": true,
"extends": ["neon/common", "neon/node", "neon/typescript", "neon/prettier"],
"parserOptions": {
- "project": "./tsconfig.eslint.json"
+ "project": ["./tsconfig.eslint.json", "./apps/*/tsconfig.eslint.json", "./packages/*/tsconfig.eslint.json"]
},
"rules": {
"@typescript-eslint/consistent-type-definitions": ["error", "interface"]
},
- "ignorePatterns": ["**/dist/*"],
- "env": {
- "jest": true
- }
+ "ignorePatterns": ["**/dist/*"]
}
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 000000000000..8b89a5e7f159
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,28 @@
+# Learn how to add code owners here:
+# https://help.github.com/en/articles/about-code-owners
+
+* @iCrawl
+
+/apps/guide/ @discordjs/website @discordjs/guide
+/apps/guide/src/content/ @discordjs/guide
+/apps/website/ @discordjs/website
+
+/packages/actions/ @discordjs/actions
+/packages/api-extractor-utils/ @discordjs/api-extractor-utils
+/packages/brokers/ @discordjs/brokers
+/packages/builders/ @discordjs/builders
+/packages/collection/ @discordjs/collection
+/packages/core/ @discordjs/core
+/packages/create-discord-bot/ @discordjs/guide
+/packages/discord.js/ @discordjs/core
+/packages/docgen/ @iCrawl
+/packages/formatters/ @discordjs/formatters
+/packages/next/ @discordjs/core
+/packages/proxy/ @discordjs/proxy
+/packages/proxy-container/ @discordjs/proxy
+/packages/rest/ @discordjs/rest
+/packages/scripts/ @discordjs/scripts
+/packages/ui/ @discordjs/ui
+/packages/util/ @discordjs/util
+/packages/voice/ @discordjs/core
+/packages/ws/ @discordjs/ws
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index fd96ed5026eb..d5f208a81e60 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -17,13 +17,32 @@ To get ready to work on the codebase, please do the following:
5. Run `yarn test` to run ESLint and ensure any JSDoc changes are valid
6. [Submit a pull request](https://github.com/discordjs/discord.js/compare) (Make sure you follow the [conventional commit format](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md))
+## Testing changes locally
+
+If you want to test changes you've made locally, you can do so by using `yarn link`. This will create a symlink to your local copy of the discord.js libraries.
+
+1. Create a new directory `mkdir discordjs-test` and move into it `cd discordjs-test`
+2. Initialize a new yarn 3 project `yarn init -2`
+3. Disable pnp `yarn config set nodeLinker node-modules`
+4. Now link the local discord.js project you cloned earlier `yarn link -A {PATH_TO_DISCORDJS_REPO}`
+5. Install packages you'd like to test locally `yarn add discord.js@latest`, `yarn add @discordjs/rest@latest`, etc. **Note: Make sure you use `latest` tag or else yarn will try to install the remote package from npm**
+6. Import the package in your source code and test them out!
+
+### Working with TypeScript packages
+
+When testing local changes, you may notice you need to manually recompile TypeScript projects on every change in order to get the latest code changes to test locally.
+
+To avoid this you can use the `--watch` parameter in the package build script to automatically recompile the project when changes are detected.
+
+For example, to automatically recompile the `@discordjs/rest` project when changes are detected, run `yarn turbo run build --filter=@discordjs/rest -- --watch` in the root folder of where you cloned the discord.js repo.
+
## Adding new packages
If you'd like to create another package under the `@discordjs` organization run the following command:
-```bash
+```sh
yarn create-package Server name: discord.js Guide Total members: 2 Your tag: User#0001 Your id: 1234567890123456781&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+gt(o.count),i=g+1;continue}r.isPadded&&(A=Gr(g,r,n)),f.string=A+f.pattern+gt(f.count),a.push(f),i=g+1,o=f}return a}function Pe(e,t,r,n,s){let a=[];for(let i of e){let{string:o}=i;!n&&!mt(t,"string",o)&&a.push(r+o),n&&mt(t,"string",o)&&a.push(r+o)}return a}function Pr(e,t){let r=[];for(let n=0;n1&&c.count.pop(),c.count.push(h.count[0]),c.string=c.pattern+lt(c.count),a=m+1;continue}t.isPadded&&(R=Lr(m,t,n)),h.string=R+h.pattern+lt(h.count),i.push(h),a=m+1,c=h}return i}function Pe(e,r,t,n,s){let i=[];for(let a of e){let{string:c}=a;!n&&!ot(r,"string",c)&&i.push(t+c),n&&ot(r,"string",c)&&i.push(t+c)}return i}function $r(e,r){let t=[];for(let n=0;n>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function tpe(r){return dc&&dc.isBuffer(r)}y2.exports=new _he("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Zhe,construct:$he,predicate:tpe,represent:epe})});var Q2=y((WZe,B2)=>{"use strict";var rpe=Ai(),ipe=Object.prototype.hasOwnProperty,npe=Object.prototype.toString;function spe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var ape=Ai(),Ape=Object.prototype.toString;function lpe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e"u"&&(t=e,e=null),tH(r,e,wa.extend({schema:J2},t))}function $pe(r,e){return rH(r,wa.extend({schema:J2},e))}md.exports.loadAll=tH;md.exports.load=rH;md.exports.safeLoadAll=Zpe;md.exports.safeLoad=$pe});var SH=y((r$e,Dv)=>{"use strict";var Id=hc(),yd=ef(),ede=Cd(),tde=rf(),uH=Object.prototype.toString,gH=Object.prototype.hasOwnProperty,rde=9,Ed=10,ide=13,nde=32,sde=33,ode=34,fH=35,ade=37,Ade=38,lde=39,cde=42,hH=44,ude=45,pH=58,gde=61,fde=62,hde=63,pde=64,dH=91,CH=93,dde=96,mH=123,Cde=124,EH=125,Li={};Li[0]="\\0";Li[7]="\\a";Li[8]="\\b";Li[9]="\\t";Li[10]="\\n";Li[11]="\\v";Li[12]="\\f";Li[13]="\\r";Li[27]="\\e";Li[34]='\\"';Li[92]="\\\\";Li[133]="\\N";Li[160]="\\_";Li[8232]="\\L";Li[8233]="\\P";var mde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Ede(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&oH(o,a)}else{for(s=0;s{"use strict";var WI=iH(),vH=SH();function zI(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Nr.exports.Type=Ai();Nr.exports.Schema=pc();Nr.exports.FAILSAFE_SCHEMA=UI();Nr.exports.JSON_SCHEMA=yv();Nr.exports.CORE_SCHEMA=wv();Nr.exports.DEFAULT_SAFE_SCHEMA=rf();Nr.exports.DEFAULT_FULL_SCHEMA=Cd();Nr.exports.load=WI.load;Nr.exports.loadAll=WI.loadAll;Nr.exports.safeLoad=WI.safeLoad;Nr.exports.safeLoadAll=WI.safeLoadAll;Nr.exports.dump=vH.dump;Nr.exports.safeDump=vH.safeDump;Nr.exports.YAMLException=ef();Nr.exports.MINIMAL_SCHEMA=UI();Nr.exports.SAFE_SCHEMA=rf();Nr.exports.DEFAULT_SCHEMA=Cd();Nr.exports.scan=zI("scan");Nr.exports.parse=zI("parse");Nr.exports.compose=zI("compose");Nr.exports.addConstructor=zI("addConstructor")});var DH=y((n$e,PH)=>{"use strict";var Nde=xH();PH.exports=Nde});var RH=y((s$e,kH)=>{"use strict";function Lde(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ic(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ic)}Lde(Ic,Error);Ic.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;gGuildMembers
privileged intent.
+-
{DESCRIPTION}
+
No summary provided.
+ )} + + ); +} diff --git a/apps/website/src/components/documentation/section/TypeParametersSection.tsx b/apps/website/src/components/documentation/section/TypeParametersSection.tsx new file mode 100644 index 000000000000..afa94f13db57 --- /dev/null +++ b/apps/website/src/components/documentation/section/TypeParametersSection.tsx @@ -0,0 +1,12 @@ +import type { ApiTypeParameterListMixin } from '@microsoft/api-extractor-model'; +import { VscSymbolParameter } from '@react-icons/all-files/vsc/VscSymbolParameter'; +import { TypeParamTable } from '../../TypeParamTable'; +import { DocumentationSection } from './DocumentationSection'; + +export function TypeParameterSection({ item }: { item: ApiTypeParameterListMixin }) { + return ( +
+ {code}
+
+ );
+ }
+
+ case DocNodeKind.FencedCode: {
+ const { language, code } = tsdoc as DocFencedCode;
+ // @ts-expect-error async component
+ return
- {code}
-
- );
- }
-
- case DocNodeKind.FencedCode: {
- const { language, code } = node as DocFencedCodeJSON;
- return - discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It - takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code - significantly tidier and easier to comprehend. -
- -