mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix(guide): Miscellaneous fixes (#11147)
* fix: miscellaneous fixes * docs: fix contributing link * fix: link * fix: you * fix: main links * fix: update source * fix: update link * fix: update update link * fix: [ * fix: remove locale * fix: update links * fix: update GitHub link --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -65,9 +65,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
## Contributing
|
||||
|
||||
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the existing guide.
|
||||
See [the contribution guide][./contributing] if you'd like to submit a PR.
|
||||
Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the existing guide. See [the contributing guide][contributing] if you'd like to submit a pull request.
|
||||
|
||||
## Local Development
|
||||
|
||||
@@ -38,9 +37,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs
|
||||
[guide]: https://discord.js/guide
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
|
||||
|
||||
@@ -143,7 +143,7 @@ client.on(Events.InteractionCreate, (interaction) => {
|
||||
});
|
||||
```
|
||||
|
||||
In this piece of code, the Promises are [chain resolved](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then#Chaining) with each other, and if one of the Promises gets rejected, the function passed to `.catch()` gets called. Here's the same code but with async/await:
|
||||
In this piece of code, the Promises are [chain resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/then#Chaining) with each other, and if one of the Promises gets rejected, the function passed to `.catch()` gets called. Here's the same code but with async/await:
|
||||
|
||||
```js title="promise-example.js" lineNumbers=9
|
||||
client.on(Events.InteractionCreate, async (interaction) => {
|
||||
|
||||
@@ -519,7 +519,7 @@ You can no longer use the `deleted` property to check if a structure was deleted
|
||||
|
||||
### ApplicationCommand
|
||||
|
||||
NFSW commands are supported.
|
||||
NSFW commands are supported.
|
||||
|
||||
### Attachment
|
||||
|
||||
|
||||
@@ -7,10 +7,9 @@ It extends JavaScript's native `Map` class, so it has all the `Map` features and
|
||||
|
||||
<Callout type="warn">
|
||||
If you're not familiar with `Map`, read [MDN's page on
|
||||
it](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) before continuing. You
|
||||
should be familiar with `Array`
|
||||
[methods](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) as well. We will
|
||||
also use some ES6 features, so read up [here](./es6-syntax) if you do not know what they are.
|
||||
it](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) before continuing. You should be
|
||||
familiar with `Array` [methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) as
|
||||
well. We will also use some ES6 features, so read up [here](./es6-syntax) if you do not know what they are.
|
||||
</Callout>
|
||||
|
||||
A `Map` allows for an association between unique keys and their values.
|
||||
@@ -45,7 +44,7 @@ Methods that follow this philosophy of staying close to the `Array` interface ar
|
||||
|
||||
## Converting to Array
|
||||
|
||||
Since `Collection` extends `Map`, it is an [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), and can be converted to an `Array` through either `Array.from()` or spread syntax (`...collection`).
|
||||
Since `Collection` extends `Map`, it is an [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols), and can be converted to an `Array` through either `Array.from()` or spread syntax (`...collection`).
|
||||
|
||||
```js
|
||||
// For values.
|
||||
|
||||
@@ -69,7 +69,7 @@ const { request } = require('undici');
|
||||
showcase!
|
||||
</Callout>
|
||||
|
||||
Random cat's API is available at [https://aws.random.cat/meow](https://aws.random.cat/meow) and returns a [JSON](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) response. To actually fetch data from the API, you're going to do the following:
|
||||
Random cat's API is available at [https://aws.random.cat/meow](https://aws.random.cat/meow) and returns a [JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON) response. To actually fetch data from the API, you're going to do the following:
|
||||
|
||||
```js
|
||||
const catResult = await request('https://aws.random.cat/meow');
|
||||
@@ -119,7 +119,7 @@ client.on(Events.InteractionCreate, async (interaction) => {
|
||||
});
|
||||
```
|
||||
|
||||
Here, you are using JavaScript's native [URLSearchParams class](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) to create a [query string](https://en.wikipedia.org/wiki/Query_string) for the URL so that the Urban Dictionary server can parse it and know what you want to look up.
|
||||
Here, you are using JavaScript's native [URLSearchParams class](https://developer.mozilla.org/docs/Web/API/URLSearchParams) to create a [query string](https://en.wikipedia.org/wiki/Query_string) for the URL so that the Urban Dictionary server can parse it and know what you want to look up.
|
||||
|
||||
If you were to do `/urban hello world`, then the URL would become https://api.urbandictionary.com/v0/define?term=hello%20world since the string `"hello world"` is encoded.
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ Create a `deploy-commands.js` file in your project directory. This file will be
|
||||
Add two more properties to your `config.json` file, which we'll need in the deployment script:
|
||||
|
||||
- `clientId`: Your application's client id ([Discord Developer Portal](https://discord.com/developers/applications) > "General Information" > application id)
|
||||
- `guildId`: Your development server's id ([Enable developer mode](https://support.discord.com/hc/en-us/articles/206346498) > Right-click the server title > "Copy ID")
|
||||
- `guildId`: Your development server's id ([Enable developer mode](https://support.discord.com/hc/articles/206346498) > Right-click the server title > "Copy ID")
|
||||
|
||||
```json title="config.json"
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ We recommend attaching a `.commands` property to your client instance so that yo
|
||||
native path utility module. `path` helps construct paths to access files and directories. One of the advantages of the
|
||||
`path` module is that it automatically detects the operating system and uses the appropriate joiners. - The
|
||||
`Collection` class extends JavaScript's native
|
||||
[`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) class, and includes more
|
||||
[`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) class, and includes more
|
||||
extensive, useful functionality. `Collection` is used to store and efficiently retrieve commands for execution.
|
||||
</Callout>
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ You'll notice the code looks very similar to the command loading above it - read
|
||||
|
||||
The `Client` class in discord.js extends the [`EventEmitter`](https://nodejs.org/api/events.html#events_class_eventemitter) class. Therefore, the `client` object exposes the [`.on()`](https://nodejs.org/api/events.html#events_emitter_on_eventname_listener) and [`.once()`](https://nodejs.org/api/events.html#events_emitter_once_eventname_listener) methods that you can use to register event listeners. These methods take two arguments: the event name and a callback function. These are defined in your separate event files as `name` and `execute`.
|
||||
|
||||
The callback function passed takes argument(s) returned by its respective event, collects them in an `args` array using the `...` [rest parameter syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters), then calls `event.execute()` while passing in the `args` array using the `...` [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax). They are used here because different events in discord.js have different numbers of arguments. The rest parameter collects these variable number of arguments into a single array, and the spread syntax then takes these elements and passes them to the `execute` function.
|
||||
The callback function passed takes argument(s) returned by its respective event, collects them in an `args` array using the `...` [rest parameter syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), then calls `event.execute()` while passing in the `args` array using the `...` [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax). They are used here because different events in discord.js have different numbers of arguments. The rest parameter collects these variable number of arguments into a single array, and the spread syntax then takes these elements and passes them to the `execute` function.
|
||||
|
||||
After this, listening for other events is as easy as creating a new file in the `events` folder. The event handler will automatically retrieve and register it whenever you restart your bot.
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ console.log(token);
|
||||
|
||||
## Using environment variables
|
||||
|
||||
Environment variables are, as the name suggets, values you can pass to your environment (e.g. terminal session, Docker container, node process). This has the benefit that you can keep your code the same for different execution contexts.
|
||||
Environment variables are, as the name suggests, values you can pass to your environment (e.g. terminal session, Docker container, node process). This has the benefit that you can keep your code the same for different execution contexts.
|
||||
|
||||
```txt title=".env"
|
||||
A=Hello World
|
||||
|
||||
@@ -30,7 +30,7 @@ If you don't know JavaScript but would like to learn about it, here are a few li
|
||||
- [JavaScript.info, a modern javascript tutorial](https://javascript.info/)
|
||||
- [Codecademy's interactive JavaScript course](https://www.codecademy.com/learn/introduction-to-javascript)
|
||||
- [Nodeschool, for both JavaScript and Node.js lessons](https://nodeschool.io/)
|
||||
- [MDN's JavaScript guide and full documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
|
||||
- [MDN's JavaScript guide and full documentation](https://developer.mozilla.org/docs/Web/JavaScript)
|
||||
- [Google, your best friend](https://google.com)
|
||||
|
||||
Take your pick, learn some JavaScript, and once you feel like you're confident enough to make a bot, come back and get started!
|
||||
|
||||
@@ -80,7 +80,7 @@ For a more detailed setup, check out the [Keyv readme](https://github.com/jaredw
|
||||
|
||||
## Usage
|
||||
|
||||
Keyv exposes a familiar [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)-like API. However, it only has `set`, `get`, `delete`, and `clear` methods. Additionally, instead of immediately returning data, these methods return [Promises](../additional-info/async-await) that resolve with the data.
|
||||
Keyv exposes a familiar [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)-like API. However, it only has `set`, `get`, `delete`, and `clear` methods. Additionally, instead of immediately returning data, these methods return [Promises](../additional-info/async-await) that resolve with the data.
|
||||
|
||||
```js
|
||||
(async () => {
|
||||
@@ -105,7 +105,7 @@ Although Keyv can assist in any scenario where you need key-value data, we will
|
||||
<Callout>
|
||||
This section will still work with any provider supported by Keyv. We recommend PostgreSQL for larger applications.
|
||||
|
||||
Do note that "large" here should be interpreted as absolutely massive. Sqlite is used at scale by many companies and products you use every single day. The slight overhead should not be noticable for the application of a Discord bot at all unless you are dealing with super complicated queries or are using specific features that do not exist in sqlite.
|
||||
Do note that "large" here should be interpreted as absolutely massive. Sqlite is used at scale by many companies and products you use every single day. The slight overhead should not be noticeable for the application of a Discord bot at all unless you are dealing with super complicated queries or are using specific features that do not exist in sqlite.
|
||||
|
||||
You can find out if sqlite might be a good choice for your project (it very likely is) by reading [their own article](https://www.sqlite.org/whentouse.html) on the topic.
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ await interaction.followUp(`You sent the two messages ${formatted} apart.`);
|
||||
|
||||
Common-tags is a library all about working with template literals.
|
||||
So far, you have probably only used them for interpolating variables into your strings, but they can do a whole lot more.
|
||||
If you've got time, you should check out [the MDN's documentation about _tagged literals_.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates).
|
||||
If you've got time, you should check out [the MDN's documentation about _tagged literals_.](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates).
|
||||
|
||||
Ever got annoyed your multi-line strings had nasty bits of indentation in them,
|
||||
but you did not want to remove the indentation in your source code?
|
||||
|
||||
@@ -81,7 +81,7 @@ After importing the `@napi-rs/canvas` module and initializing it, you should loa
|
||||
<Callout>
|
||||
`@napi-rs/canvas` works almost identical to HTML5 Canvas. You can read the HTML5 Canvas tutorials on
|
||||
[w3Schools](https://www.w3schools.com/html/html5_canvas.asp) and
|
||||
[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) for more information later!
|
||||
[MDN](https://developer.mozilla.org/docs/Web/API/Canvas_API) for more information later!
|
||||
</Callout>
|
||||
|
||||
```js lineNumbers=10 title="index.js"
|
||||
@@ -101,7 +101,7 @@ client.on(Events.InteractionCreate, async (interaction) => {
|
||||
|
||||
Now, you need to load the image you want to use into Canvas.
|
||||
|
||||
We'll be using [this image](https://github.com/discordjs/guide/blob/main/guide/popular-topics/images/canvas.jpg) as the background in the welcome image, but you can use whatever you want. Be sure to download the file, name it `wallpaper.jpg`, and save it inside the same directory as your main bot file.
|
||||
We'll be using [this image](https://github.com/discordjs/discord.js/blob/main/apps/guide/content/docs/legacy/popular-topics/images/canvas.jpg) as the background in the welcome image, but you can use whatever you want. Be sure to download the file, name it `wallpaper.jpg`, and save it inside the same directory as your main bot file.
|
||||
|
||||
```js lineNumbers=10 title="index.js"
|
||||
client.on(Events.InteractionCreate, async (interaction) => {
|
||||
@@ -222,7 +222,7 @@ client.on(Events.InteractionCreate, async (interaction) => {
|
||||
|
||||
<Callout>
|
||||
You can read more about `context.arc()` on [w3schools](https://www.w3schools.com/tags/canvas_arc.asp) or
|
||||
[MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc).
|
||||
[MDN](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc).
|
||||
</Callout>
|
||||
|
||||
### Adding in text
|
||||
|
||||
@@ -24,9 +24,9 @@ collector.on('end', (collected) => {
|
||||
});
|
||||
```
|
||||
|
||||
You can provide a `filter` key to the object parameter of `createMessageCollector()`. The value to this key should be a function that returns a boolean value to indicate if this message should be collected or not. To check for multiple conditions in your filter you can connect them using [logical operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#logical_operators). If you don't provide a filter all messages in the channel the collector was started on will be collected.
|
||||
You can provide a `filter` key to the object parameter of `createMessageCollector()`. The value to this key should be a function that returns a boolean value to indicate if this message should be collected or not. To check for multiple conditions in your filter you can connect them using [logical operators](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Expressions_and_Operators#logical_operators). If you don't provide a filter all messages in the channel the collector was started on will be collected.
|
||||
|
||||
Note that the above example uses [implicit return](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#function_body) for the filter function and passes it to the options object using the [object property shorthand](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#property_definitions) notation.
|
||||
Note that the above example uses [implicit return](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Arrow_functions#function_body) for the filter function and passes it to the options object using the [object property shorthand](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#property_definitions) notation.
|
||||
|
||||
If a message passes through the filter, it will trigger the `collect` event for the `collector` you've created. This message is then passed into the event listener as `collected` and the provided function is executed. In the above example, you simply log the message. Once the collector finishes collecting based on the provided end conditions the `end` event emits.
|
||||
|
||||
@@ -81,7 +81,7 @@ interaction.reply({ content: item.question, withResponse: true }).then((response
|
||||
|
||||
<Callout>
|
||||
If you don't understand how `.some()` works, you can read about it in more detail
|
||||
[here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
|
||||
[here](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some).
|
||||
</Callout>
|
||||
|
||||
In this filter, you iterate through the answers to find what you want. You would like to ignore the case because simple typos can happen, so you convert each answer to its lowercase form and check if it's equal to the response in lowercase form as well. In the options section, you only want to allow one answer to pass through, hence the `max: 1` setting.
|
||||
|
||||
@@ -20,7 +20,7 @@ Example: `The messages must be an Array, Collection, or number.`
|
||||
|
||||
### JavaScript errors
|
||||
|
||||
JavaScript errors are thrown by node itself or by discord.js. These errors can easily be fixed by looking at the type of error and the stack trace. You can find a full list of types [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) and a list of common JavaScript errors [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors).
|
||||
JavaScript errors are thrown by node itself or by discord.js. These errors can easily be fixed by looking at the type of error and the stack trace. You can find a full list of types [here](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error) and a list of common JavaScript errors [here](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors).
|
||||
|
||||
Examples:
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Rather than blindly enabling all intents, consider what information you actually
|
||||
|
||||
## Privileged Intents
|
||||
|
||||
Discord defines some intents as "privileged" due to the data's sensitive nature. At the time of writing this article, privileged intents are `GuildPresences`, `MessageContent` and `GuildMembers`. If your bot is not verified and in less than 100 guilds, you can enable privileged gateway intents in the [Discord Developer Portal](https://discord.com/developers/applications) under "Privileged Gateway Intents" in the "Bot" section. If your bot is already verified or is about to [require verification](https://support-dev.discord.com/hc/en-us/articles/23926564536471), you need to request privileged intents. You can do this in your verification application or by reaching out to Discord's [support team](https://dis.gd/contact), including why you require access to each privileged intent.
|
||||
Discord defines some intents as "privileged" due to the data's sensitive nature. At the time of writing this article, privileged intents are `GuildPresences`, `MessageContent` and `GuildMembers`. If your bot is not verified and in less than 100 guilds, you can enable privileged gateway intents in the [Discord Developer Portal](https://discord.com/developers/applications) under "Privileged Gateway Intents" in the "Bot" section. If your bot is already verified or is about to [require verification](https://support-dev.discord.com/hc/articles/23926564536471), you need to request privileged intents. You can do this in your verification application or by reaching out to Discord's [support team](https://dis.gd/contact), including why you require access to each privileged intent.
|
||||
|
||||
Before storming off and doing so, you should stop and carefully think about if you need these events. Discord made them opt-in so users across the platform can enjoy a higher level of [privacy](https://en.wikipedia.org/wiki/Privacy_by_design). Presences can expose quite a bit of personal information, including the games being played and overall online time. You might find that it isn't necessary for your bot to have this level of information about all guild members at all times, considering you still get the command author as GuildMember from the command execution message and can fetch other targets separately.
|
||||
|
||||
@@ -75,6 +75,6 @@ If you want to view the built flags you can utilize the `.toArray()`, `.serializ
|
||||
|
||||
## More on Bitfields
|
||||
|
||||
Discord Intents and Permissions are stored in a 53-bit integer and calculated using bitwise operations. If you want to dive deeper into what's happening behind the curtains, check the [Wikipedia](https://en.wikipedia.org/wiki/Bit_field) and [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#binary_bitwise_operators) articles on the topic.
|
||||
Discord Intents and Permissions are stored in a 53-bit integer and calculated using bitwise operations. If you want to dive deeper into what's happening behind the curtains, check the [Wikipedia](https://en.wikipedia.org/wiki/Bit_field) and [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#binary_bitwise_operators) articles on the topic.
|
||||
|
||||
In discord.js, Permissions and Intents bitfields are represented as either the decimal value of said bit field or its referenced flags. Every position in a permissions bitfield represents one of these flags and its state (either referenced `1` or not referenced `0`).
|
||||
|
||||
@@ -49,7 +49,7 @@ if (message.partial) {
|
||||
|
||||
## Obtaining the full structure
|
||||
|
||||
Along with `.partial` to check if the structure you call it on is partial or not, the library also introduced a `.fetch()` method to retrieve the missing data from the API and complete the structure. The method returns a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) you need to handle. After the Promise resolves (and with it, the missing data arrived), you can use the structure as you would before.
|
||||
Along with `.partial` to check if the structure you call it on is partial or not, the library also introduced a `.fetch()` method to retrieve the missing data from the API and complete the structure. The method returns a [Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) you need to handle. After the Promise resolves (and with it, the missing data arrived), you can use the structure as you would before.
|
||||
|
||||
```js
|
||||
// [!code word:partial]
|
||||
|
||||
@@ -4,7 +4,7 @@ title: Permissions (extended)
|
||||
|
||||
## Discord's permission system
|
||||
|
||||
Discord permissions are stored in a 53-bit integer and calculated using bitwise operations. If you want to dive deeper into what's happening behind the curtains, check the [Wikipedia](https://en.wikipedia.org/wiki/Bit_field) and [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators#binary_bitwise_operators) articles on the topic.
|
||||
Discord permissions are stored in a 53-bit integer and calculated using bitwise operations. If you want to dive deeper into what's happening behind the curtains, check the [Wikipedia](https://en.wikipedia.org/wiki/Bit_field) and [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#binary_bitwise_operators) articles on the topic.
|
||||
|
||||
In discord.js, permission bit fields are represented as either the decimal value of said bit field or its referenced flags.
|
||||
Every position in a permissions bit field represents one of these flags and its state (either referenced `1` or not referenced `0`).
|
||||
|
||||
@@ -183,7 +183,7 @@ If you try again with either of the code blocks above, you'll get the result you
|
||||
|
||||
<Callout>
|
||||
If you aren't familiar with Promises or `async`/`await`, you can read more about them on
|
||||
[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or [our guide page on
|
||||
[MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise) or [our guide page on
|
||||
async/await](../additional-info/async-await.md)!
|
||||
</Callout>
|
||||
|
||||
@@ -234,8 +234,8 @@ message.reactions.cache
|
||||
|
||||
<Callout>
|
||||
If you are not familiar with `Collection#filter` and
|
||||
[`Map.has()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) take the time
|
||||
to understand what they do and then come back.
|
||||
[`Map.has()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/has) take the time to
|
||||
understand what they do and then come back.
|
||||
</Callout>
|
||||
|
||||
Removing reactions by a user is not as straightforward as removing by emoji or removing all reactions. The API does not provide a method for selectively removing the reactions of a user. This means you will have to iterate through reactions that include the user and remove them.
|
||||
|
||||
@@ -29,7 +29,7 @@ If you would like to get the webhook object that sent the message, you can use `
|
||||
Webhook fetching will always make use of collections and Promises. If you do not understand either concept, revise
|
||||
them, and then come back to this section. You can read about collections [here](../additional-info/collections), and
|
||||
Promises [here](../additional-info/async-await) and
|
||||
[here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises).
|
||||
[here](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises).
|
||||
</Callout>
|
||||
|
||||
### Fetching all webhooks of a guild
|
||||
|
||||
@@ -42,7 +42,7 @@ bun add discord.js sequelize sqlite3
|
||||
<Callout>
|
||||
This section will still work with any provider supported by sequelize. We recommend PostgreSQL for larger applications.
|
||||
|
||||
Do note that "large" here should be interpreted as absolutely massive. Sqlite is used at scale by many companies and products you use every single day. The slight overhead should not be noticable for the application of a Discord bot at all unless you are dealing with super complicated queries or are using specific features that do not exist in sqlite.
|
||||
Do note that "large" here should be interpreted as absolutely massive. Sqlite is used at scale by many companies and products you use every single day. The slight overhead should not be noticeable for the application of a Discord bot at all unless you are dealing with super complicated queries or are using specific features that do not exist in sqlite.
|
||||
|
||||
You can find out if sqlite might be a good choice for your project (it very likely is) by reading [their own article](https://www.sqlite.org/whentouse.html) on the topic.
|
||||
|
||||
@@ -106,7 +106,7 @@ In any relational database, you need to create tables to store your data. This s
|
||||
| bob | is the best | bob | 0 |
|
||||
| tableflip | (╯°□°)╯︵ ┻━┻ | joe | 8 |
|
||||
|
||||
To do that in Sequelize, define a model based on this structure below the connection information, as shown below, after the `sequelize` initalisation.
|
||||
To do that in Sequelize, define a model based on this structure below the connection information, as shown below, after the `sequelize` initialization.
|
||||
|
||||
```js title="sequelize-example.js"
|
||||
// ...
|
||||
|
||||
@@ -91,12 +91,12 @@ Take the following snippet of code:
|
||||
client.shard.fetchClientValues('guilds.cache.size').then(console.log); // [!code word:fetchClientValues]
|
||||
```
|
||||
|
||||
If you run it, you will notice an output like `[898, 901, 900, 901]`. You will be correct in assuming that that's the total number of guilds per shard stored in an array in the Promise. This probably isn't the ideal output for guild count, so let's use [Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) to provide a better output.
|
||||
If you run it, you will notice an output like `[898, 901, 900, 901]`. You will be correct in assuming that that's the total number of guilds per shard stored in an array in the Promise. This probably isn't the ideal output for guild count, so let's use [Array.reduce()](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) to provide a better output.
|
||||
|
||||
<Callout>
|
||||
It's highly recommended for you to visit [the
|
||||
documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) to
|
||||
understand how the `reduce()` method works, as you will probably find great use of it in sharding.
|
||||
documentation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) to understand
|
||||
how the `reduce()` method works, as you will probably find great use of it in sharding.
|
||||
</Callout>
|
||||
|
||||
In this case, this method iterates through the array and adds each current value to the total amount:
|
||||
@@ -149,7 +149,7 @@ This will run the code given to `broadcastEval` on each shard and return the res
|
||||
|
||||
```js
|
||||
client.shard
|
||||
.broadcastEval((c) => c.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)) // [!code word:boradcastEval]
|
||||
.broadcastEval((c) => c.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)) // [!code word:broadcastEval]
|
||||
.then((results) => {
|
||||
return interaction.reply(`Total member count: ${results.reduce((acc, memberCount) => acc + memberCount, 0)}`);
|
||||
})
|
||||
@@ -158,7 +158,7 @@ client.shard
|
||||
|
||||
## Putting them together
|
||||
|
||||
You'd likely want to output both pieces of information in the stats command. You can combine these two results with [Promise.all()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all):
|
||||
You'd likely want to output both pieces of information in the stats command. You can combine these two results with [Promise.all()](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all):
|
||||
|
||||
```js
|
||||
const promises = [
|
||||
@@ -192,7 +192,7 @@ client.on(Events.InteractionCreate, (interaction) => {
|
||||
// [!code ++:12]
|
||||
const promises = [
|
||||
client.shard.fetchClientValues('guilds.cache.size'),
|
||||
lient.shard.broadcastEval((c) => c.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)),
|
||||
client.shard.broadcastEval((c) => c.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)),
|
||||
];
|
||||
|
||||
return Promise.all(promises)
|
||||
|
||||
@@ -37,12 +37,12 @@ module.exports = {
|
||||
};
|
||||
```
|
||||
|
||||
Since `reason` isn't a required option, the example above uses the `??` [nullish coalescing operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator) to set a default value in case the user does not supply a value for `reason`.
|
||||
Since `reason` isn't a required option, the example above uses the `??` [nullish coalescing operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator) to set a default value in case the user does not supply a value for `reason`.
|
||||
|
||||
If the target user is still in the guild where the command is being run, you can also use `.getMember('target')` to get their `GuildMember` object.
|
||||
|
||||
<Callout>
|
||||
If you want the id (Snowflake) of a structure instead, grab the option via `get()` and access the Snowflake via the `value` property. Note that you should use `const { value: name } = ...` here to [destructure and rename](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) the value obtained from the `CommandInteractionOption` structure to avoid identifier name conflicts.
|
||||
If you want the id (Snowflake) of a structure instead, grab the option via `get()` and access the Snowflake via the `value` property. Note that you should use `const { value: name } = ...` here to [destructure and rename](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) the value obtained from the `CommandInteractionOption` structure to avoid identifier name conflicts.
|
||||
</Callout>
|
||||
|
||||
In the same way as the above examples, you can get values of any type using the corresponding `CommandInteractionOptionResolver#get_____()` method. `String`, `Integer`, `Number` and `Boolean` options all provide the respective primitive types, while `User`, `Channel`, `Role`, and `Mentionable` options will provide either the respective discord.js class instance if your application has a bot user in the guild or a raw API structure for commands-only deployments.
|
||||
|
||||
@@ -28,13 +28,13 @@ const data = new SlashCommandBuilder()
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers); // [!code ++]
|
||||
```
|
||||
|
||||
For a kick command however, yout can allow members with the `KickMembers` permission to execute the command, so that's why the flag is listed here here.
|
||||
For a kick command however, you can allow members with the `KickMembers` permission to execute the command, so that's why the flag is listed here here.
|
||||
|
||||
<Callout>
|
||||
You can require the user to have all of multiple permissions by merging them with the `|` bitwise OR operator (for example `PermissionFlagsBits.BanMembers | PermissionFlagsBits.KickMembers`).
|
||||
You cannot require any of multiple permissions. Discord evaluates against the combined permission bitfield!
|
||||
|
||||
If you want to learn more about the `|` bitwise OR operator you can check the [Wikipedia](https://en.wikipedia.org/wiki/Bitwise_operation#OR) and [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_OR) articles on the topic.
|
||||
If you want to learn more about the `|` bitwise OR operator you can check the [Wikipedia](https://en.wikipedia.org/wiki/Bitwise_operation#OR) and [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Bitwise_OR) articles on the topic.
|
||||
|
||||
</Callout>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: Installation
|
||||
---
|
||||
|
||||
"Voice" refers to Discord bots being able to send audio in voice channels. This is supported in discord.js via @discordjs/voice](https://github.com/discordjs/discord.js/tree/main/packages/voice), a standalone library made by the developers of discord.js. While you can use it with any Node.js Discord API library, this guide will focus on using it with discord.js.
|
||||
"Voice" refers to Discord bots being able to send audio in voice channels. This is supported in discord.js via [@discordjs/voice](https://github.com/discordjs/discord.js/tree/main/packages/voice), a standalone library made by the developers of discord.js. While you can use it with any Node.js Discord API library, this guide will focus on using it with discord.js.
|
||||
|
||||
## Installation
|
||||
|
||||
|
||||
@@ -38,9 +38,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
|
||||
@@ -35,9 +35,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/actions
|
||||
|
||||
@@ -35,9 +35,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/api-extractor-utils
|
||||
|
||||
@@ -126,9 +126,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/brokers/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/brokers
|
||||
|
||||
@@ -62,9 +62,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/builders/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/builders
|
||||
|
||||
@@ -57,9 +57,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/collection/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/collection
|
||||
|
||||
@@ -118,9 +118,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/core/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/core
|
||||
|
||||
@@ -43,9 +43,9 @@ See [the contribution guide][contributing] if you'd like to submit a pull reques
|
||||
|
||||
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js server][discord].
|
||||
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/create-discord-bot
|
||||
|
||||
@@ -134,9 +134,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/discord.js/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/discord.js
|
||||
|
||||
@@ -36,9 +36,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/docgen
|
||||
|
||||
@@ -74,9 +74,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/formatters/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/formatters
|
||||
|
||||
@@ -50,9 +50,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/next/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/next
|
||||
|
||||
@@ -73,9 +73,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/proxy-container
|
||||
|
||||
@@ -58,9 +58,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/proxy/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/proxy
|
||||
|
||||
@@ -127,9 +127,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/rest/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/rest
|
||||
|
||||
@@ -35,9 +35,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/scripts
|
||||
|
||||
@@ -58,9 +58,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/structures/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/structures
|
||||
|
||||
@@ -35,9 +35,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/ui
|
||||
|
||||
@@ -55,9 +55,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/util/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/util
|
||||
|
||||
@@ -100,9 +100,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/voice/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/voice
|
||||
|
||||
@@ -212,9 +212,9 @@ If you don't understand something in the documentation, you are experiencing pro
|
||||
[website]: https://discord.js.org
|
||||
[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
|
||||
[documentation]: https://discord.js.org/docs/packages/ws/stable
|
||||
[guide]: https://discordjs.guide/
|
||||
[guide-source]: https://github.com/discordjs/guide
|
||||
[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
|
||||
[guide]: https://discordjs.guide
|
||||
[guide-source]: https://github.com/discordjs/discord.js/tree/main/apps/guide
|
||||
[guide-update]: https://discordjs.guide/legacy/additional-info/changes-in-v14
|
||||
[discord]: https://discord.gg/djs
|
||||
[discord-developers]: https://discord.gg/discord-developers
|
||||
[source]: https://github.com/discordjs/discord.js/tree/main/packages/ws
|
||||
|
||||
Reference in New Issue
Block a user