Replace a few rejections with throw (#590)

This commit is contained in:
Schuyler Cebulskie
2016-09-03 16:36:54 -04:00
committed by Amish Shah
parent 44b34154e8
commit 64d89b3748
2 changed files with 2 additions and 4 deletions

View File

@@ -104,8 +104,7 @@ class ClientVoiceManager {
joinChannel(channel) {
return new Promise((resolve, reject) => {
if (this.pending.get(channel.guild.id)) {
reject(new Error('already connecting to a channel in this guild'));
return;
throw new Error('already connecting to a channel in this guild');
}
const existingConn = this.connections.get(channel.guild.id);
if (existingConn) {