Voice and Client bug fixes #161

Merged
merged 8 commits into from Jan 15, 2017

Projects

None yet

4 participants

@briantanner
Contributor
  • Fix 'channels' of undefined in Client.getMessage
  • Remove inconsistent promise rejection in leaveVoiceChannel
  • Fix undefined pending guilds in readyHandler and disconnectHandler in VoiceConnectionManager
@briantanner
Contributor

The voice stuff may need looking at further

lib/Client.js
@@ -276,7 +276,16 @@ class Client extends EventEmitter {
* @returns {GuildChannel | GroupChannel | PrivateChannel}
*/
getChannel(channelID) {
- return this.channelGuildMap[channelID] ? this.guilds.get(this.channelGuildMap[channelID]).channels.get(channelID) : this.privateChannels.get(channelID) || this.groupChannels.get(channelID);
+ const guildID = this.channelGuildMap[channelID];
@brussell98
brussell98 Jan 9, 2017 Contributor

This seems to be uneeded

@briantanner
briantanner Jan 9, 2017 Contributor

Ahh right, thanks for pointing it out

@hsiW hsiW added the voice label Jan 10, 2017
@abalabahaha
Owner

Its probably better to figure out why channelGuildMap has data for guilds that don't appear to exist, rather than checking for null/undefined there

@abalabahaha abalabahaha merged commit 611d697 into abalabahaha:dev Jan 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment