@discordjs/voice 1.0.0-dev.1783513686-6e81ea771 → 1.0.0-dev.1784246195-c73e2a76d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1733,14 +1733,16 @@ declare class VoiceConnection extends EventEmitter {
|
|
|
1733
1733
|
*/
|
|
1734
1734
|
configureNetworking(): void;
|
|
1735
1735
|
/**
|
|
1736
|
-
* Called when the networking instance for this connection closes. If the close code is 4014
|
|
1737
|
-
* the voice connection will transition to the Disconnected state which will store the
|
|
1738
|
-
* decide whether or not to reconnect when this occurs by listening for the state change
|
|
1736
|
+
* Called when the networking instance for this connection closes. If the close code is 4014, 4021, or 4022
|
|
1737
|
+
* (do not reconnect), the voice connection will transition to the Disconnected state which will store the
|
|
1738
|
+
* close code. You can decide whether or not to reconnect when this occurs by listening for the state change
|
|
1739
|
+
* and calling reconnect().
|
|
1739
1740
|
*
|
|
1740
1741
|
* @remarks
|
|
1741
|
-
* If the close code was anything other than 4014, it is likely that the closing was not intended,
|
|
1742
|
-
* VoiceConnection will signal to Discord that it would like to rejoin the channel. This automatically
|
|
1743
|
-
* to re-establish the connection. This would be seen as a transition from the Ready state to the
|
|
1742
|
+
* If the close code was anything other than 4014, 4021, or 4022, it is likely that the closing was not intended,
|
|
1743
|
+
* and so the VoiceConnection will signal to Discord that it would like to rejoin the channel. This automatically
|
|
1744
|
+
* attempts to re-establish the connection. This would be seen as a transition from the Ready state to the
|
|
1745
|
+
* Signalling state.
|
|
1744
1746
|
* @param code - The close code
|
|
1745
1747
|
*/
|
|
1746
1748
|
private onNetworkingClose;
|
package/dist/index.d.ts
CHANGED
|
@@ -1733,14 +1733,16 @@ declare class VoiceConnection extends EventEmitter {
|
|
|
1733
1733
|
*/
|
|
1734
1734
|
configureNetworking(): void;
|
|
1735
1735
|
/**
|
|
1736
|
-
* Called when the networking instance for this connection closes. If the close code is 4014
|
|
1737
|
-
* the voice connection will transition to the Disconnected state which will store the
|
|
1738
|
-
* decide whether or not to reconnect when this occurs by listening for the state change
|
|
1736
|
+
* Called when the networking instance for this connection closes. If the close code is 4014, 4021, or 4022
|
|
1737
|
+
* (do not reconnect), the voice connection will transition to the Disconnected state which will store the
|
|
1738
|
+
* close code. You can decide whether or not to reconnect when this occurs by listening for the state change
|
|
1739
|
+
* and calling reconnect().
|
|
1739
1740
|
*
|
|
1740
1741
|
* @remarks
|
|
1741
|
-
* If the close code was anything other than 4014, it is likely that the closing was not intended,
|
|
1742
|
-
* VoiceConnection will signal to Discord that it would like to rejoin the channel. This automatically
|
|
1743
|
-
* to re-establish the connection. This would be seen as a transition from the Ready state to the
|
|
1742
|
+
* If the close code was anything other than 4014, 4021, or 4022, it is likely that the closing was not intended,
|
|
1743
|
+
* and so the VoiceConnection will signal to Discord that it would like to rejoin the channel. This automatically
|
|
1744
|
+
* attempts to re-establish the connection. This would be seen as a transition from the Ready state to the
|
|
1745
|
+
* Signalling state.
|
|
1744
1746
|
* @param code - The close code
|
|
1745
1747
|
*/
|
|
1746
1748
|
private onNetworkingClose;
|
package/dist/index.js
CHANGED
|
@@ -2441,19 +2441,21 @@ var VoiceConnection = class extends import_node_events8.EventEmitter {
|
|
|
2441
2441
|
};
|
|
2442
2442
|
}
|
|
2443
2443
|
/**
|
|
2444
|
-
* Called when the networking instance for this connection closes. If the close code is 4014
|
|
2445
|
-
* the voice connection will transition to the Disconnected state which will store the
|
|
2446
|
-
* decide whether or not to reconnect when this occurs by listening for the state change
|
|
2444
|
+
* Called when the networking instance for this connection closes. If the close code is 4014, 4021, or 4022
|
|
2445
|
+
* (do not reconnect), the voice connection will transition to the Disconnected state which will store the
|
|
2446
|
+
* close code. You can decide whether or not to reconnect when this occurs by listening for the state change
|
|
2447
|
+
* and calling reconnect().
|
|
2447
2448
|
*
|
|
2448
2449
|
* @remarks
|
|
2449
|
-
* If the close code was anything other than 4014, it is likely that the closing was not intended,
|
|
2450
|
-
* VoiceConnection will signal to Discord that it would like to rejoin the channel. This automatically
|
|
2451
|
-
* to re-establish the connection. This would be seen as a transition from the Ready state to the
|
|
2450
|
+
* If the close code was anything other than 4014, 4021, or 4022, it is likely that the closing was not intended,
|
|
2451
|
+
* and so the VoiceConnection will signal to Discord that it would like to rejoin the channel. This automatically
|
|
2452
|
+
* attempts to re-establish the connection. This would be seen as a transition from the Ready state to the
|
|
2453
|
+
* Signalling state.
|
|
2452
2454
|
* @param code - The close code
|
|
2453
2455
|
*/
|
|
2454
2456
|
onNetworkingClose(code) {
|
|
2455
2457
|
if (this.state.status === "destroyed" /* Destroyed */) return;
|
|
2456
|
-
if (code === 4014) {
|
|
2458
|
+
if (code === 4014 || code === 4021 || code === 4022) {
|
|
2457
2459
|
this.state = {
|
|
2458
2460
|
...this.state,
|
|
2459
2461
|
status: "disconnected" /* Disconnected */,
|
|
@@ -3110,7 +3112,7 @@ __name(findPackageJSON, "findPackageJSON");
|
|
|
3110
3112
|
function version(name) {
|
|
3111
3113
|
try {
|
|
3112
3114
|
if (name === "@discordjs/voice") {
|
|
3113
|
-
return "1.0.0-dev.
|
|
3115
|
+
return "1.0.0-dev.1784246195-c73e2a76d";
|
|
3114
3116
|
}
|
|
3115
3117
|
const pkg = findPackageJSON((0, import_node_path.dirname)(require.resolve(name)), name, 3);
|
|
3116
3118
|
return pkg?.version ?? "not found";
|
|
@@ -3258,7 +3260,7 @@ async function demuxProbe(stream, probeSize = 1024, validator = validateDiscordO
|
|
|
3258
3260
|
__name(demuxProbe, "demuxProbe");
|
|
3259
3261
|
|
|
3260
3262
|
// src/index.ts
|
|
3261
|
-
var version2 = "1.0.0-dev.
|
|
3263
|
+
var version2 = "1.0.0-dev.1784246195-c73e2a76d";
|
|
3262
3264
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3263
3265
|
0 && (module.exports = {
|
|
3264
3266
|
AudioPacket,
|