@discordjs/voice
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -133,3 +133,5 @@ /// <reference types="node" /> | ||
} & { | ||
[status in AudioPlayerStatus]: (oldState: AudioPlayerState, newState: AudioPlayerState) => Awaited<void>; | ||
[status in AudioPlayerStatus]: (oldState: AudioPlayerState, newState: AudioPlayerState & { | ||
status: status; | ||
}) => Awaited<void>; | ||
}; | ||
@@ -136,0 +138,0 @@ /** |
@@ -134,3 +134,5 @@ /// <reference types="node" /> | ||
} & { | ||
[status in VoiceConnectionStatus]: (oldState: VoiceConnectionState, newState: VoiceConnectionState) => Awaited<void>; | ||
[status in VoiceConnectionStatus]: (oldState: VoiceConnectionState, newState: VoiceConnectionState & { | ||
status: status; | ||
}) => Awaited<void>; | ||
}; | ||
@@ -137,0 +139,0 @@ /** |
@@ -338,2 +338,3 @@ "use strict"; | ||
} | ||
this.joinConfig.channelId = null; | ||
if (!this.state.adapter.sendPayload(DataStore_1.createJoinVoiceChannelPayload(this.joinConfig))) { | ||
@@ -369,9 +370,13 @@ this.state = { | ||
} | ||
this.rejoinAttempts++; | ||
const notReady = this.state.status !== VoiceConnectionStatus.Ready; | ||
if (notReady) | ||
this.rejoinAttempts++; | ||
Object.assign(this.joinConfig, joinConfig); | ||
if (this.state.adapter.sendPayload(DataStore_1.createJoinVoiceChannelPayload(this.joinConfig))) { | ||
this.state = { | ||
...this.state, | ||
status: VoiceConnectionStatus.Signalling, | ||
}; | ||
if (notReady) { | ||
this.state = { | ||
...this.state, | ||
status: VoiceConnectionStatus.Signalling, | ||
}; | ||
} | ||
return true; | ||
@@ -378,0 +383,0 @@ } |
{ | ||
"name": "@discordjs/voice", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Implementation of the Discord Voice API for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
513757
4476