mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
@@ -18,7 +18,7 @@ To add a new page to the guide, create a `filename.mdx` file in the folder of yo
|
|||||||
|
|
||||||
## Framework and components
|
## Framework and components
|
||||||
|
|
||||||
The guide uses the fumadocs documention framework for Next.js. You can find examples as well as documentation for the components you can use at <https://fumadocs.dev/docs/ui>.
|
The guide uses the fumadocs documentation framework for Next.js. You can find examples as well as documentation for the components you can use at <https://fumadocs.dev/docs/ui>.
|
||||||
|
|
||||||
## General guidelines
|
## General guidelines
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ When referring to yourself, use "we" (as in "the writers of this guide") instead
|
|||||||
|
|
||||||
#### Inclusive language
|
#### Inclusive language
|
||||||
|
|
||||||
Try to avoid using genered and otherwise non-inclusive language. The following are just examples to give you an idea of what we expect. Don't understand this as a complete list of "banned terms":
|
Try to avoid using gendered and otherwise non-inclusive language. The following are just examples to give you an idea of what we expect. Don't understand this as a complete list of "banned terms":
|
||||||
|
|
||||||
- Use they/them/their instead of gendered pronouns (he/him/his, she/her/hers).
|
- Use they/them/their instead of gendered pronouns (he/him/his, she/her/hers).
|
||||||
- Avoid using "master" and "slave", you can use "primary" and "replica" or "secondary" instead.
|
- Avoid using "master" and "slave", you can use "primary" and "replica" or "secondary" instead.
|
||||||
@@ -95,7 +95,7 @@ console.log('Hello'); // [!code --]
|
|||||||
console.log('Hello World'); // [!code ++]
|
console.log('Hello World'); // [!code ++]
|
||||||
```
|
```
|
||||||
|
|
||||||
You can put the transfomer syntax above the respective line and declare ranges instead of repeating formatting intsructions. You can also combine different transformers on the same line. Note that word highlights highlight the word across the code block by default, but do respect ranges.
|
You can put the transformer syntax above the respective line and declare ranges instead of repeating formatting intsructions. You can also combine different transformers on the same line. Note that word highlights highlight the word across the code block by default, but do respect ranges.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
console.log('Hello'); // [!code --:2]
|
console.log('Hello'); // [!code --:2]
|
||||||
@@ -126,7 +126,7 @@ Make sure to denote the file names or paths if you describe progress in a specif
|
|||||||
```
|
```
|
||||||
|
|
||||||
```js tab="Usage"
|
```js tab="Usage"
|
||||||
// code showing how to use what is being configued
|
// code showing how to use what is being configured
|
||||||
```
|
```
|
||||||
````
|
````
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ title: Display Components
|
|||||||
|
|
||||||
While you might be familiar with [embeds](./embeds) in Discord, there are more ways to style and format your apps messages using **display components**, a comprehensive set of layout and content elements.
|
While you might be familiar with [embeds](./embeds) in Discord, there are more ways to style and format your apps messages using **display components**, a comprehensive set of layout and content elements.
|
||||||
|
|
||||||
To use the display components, you need to pass the `IsComponentsV2` message flag (in docs: `MessageFlags`) when sending a message. You only need to use this flag when sending a message using the display components system, not when deffering interaction responses.
|
To use the display components, you need to pass the `IsComponentsV2` message flag (in docs: `MessageFlags`) when sending a message. You only need to use this flag when sending a message using the display components system, not when deferring interaction responses.
|
||||||
|
|
||||||
<Callout type="warn">
|
<Callout type="warn">
|
||||||
Opting into using this system by passing the `IsComponentsV2` flag comes with a set of caveats:
|
Opting into using this system by passing the `IsComponentsV2` flag comes with a set of caveats:
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ export class VoiceWebSocket extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a binary mesasge over the WebSocket.
|
* Sends a binary message over the WebSocket.
|
||||||
*
|
*
|
||||||
* @param opcode - The opcode to use
|
* @param opcode - The opcode to use
|
||||||
* @param payload - The payload to send
|
* @param payload - The payload to send
|
||||||
|
|||||||
Reference in New Issue
Block a user