docs(api): document option validation
This commit is contained in:
@@ -123,6 +123,9 @@ type AudioManagerOptions = {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`connectTimeoutMs` and numeric `renewIntervalMs` values must be whole milliseconds from `1` through `2_147_483_647`.
|
||||||
|
`volume.initialPercent` must be a finite number from `0` through `100` and requires `volume.enabled: true`.
|
||||||
|
|
||||||
### Defaults
|
### Defaults
|
||||||
|
|
||||||
| Option | Default |
|
| Option | Default |
|
||||||
|
|||||||
+3
-1
@@ -112,7 +112,7 @@ export type VolumeOptions = {
|
|||||||
/**
|
/**
|
||||||
* Initial volume percentage applied when playback starts.
|
* Initial volume percentage applied when playback starts.
|
||||||
*
|
*
|
||||||
* Requires `enabled: true`.
|
* Must be a finite number from `0` through `100` and requires `enabled: true`.
|
||||||
*/
|
*/
|
||||||
initialPercent?: number;
|
initialPercent?: number;
|
||||||
};
|
};
|
||||||
@@ -144,6 +144,7 @@ export type AudioManagerOptions = {
|
|||||||
* Milliseconds after which the manager reconnects and restarts playback.
|
* Milliseconds after which the manager reconnects and restarts playback.
|
||||||
*
|
*
|
||||||
* Renewal is disabled unless an interval is provided.
|
* Renewal is disabled unless an interval is provided.
|
||||||
|
* Numeric values must be integers from `1` through `2_147_483_647`.
|
||||||
*
|
*
|
||||||
* @defaultValue `false`
|
* @defaultValue `false`
|
||||||
*/
|
*/
|
||||||
@@ -151,6 +152,7 @@ export type AudioManagerOptions = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Maximum milliseconds to wait for the Discord voice connection to become ready.
|
* Maximum milliseconds to wait for the Discord voice connection to become ready.
|
||||||
|
* Must be an integer from `1` through `2_147_483_647`.
|
||||||
*
|
*
|
||||||
* @defaultValue `20_000`
|
* @defaultValue `20_000`
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user