diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js index cf8d77b25..6ba335e05 100644 --- a/src/client/ClientDataResolver.js +++ b/src/client/ClientDataResolver.js @@ -196,8 +196,7 @@ class ClientDataResolver { const file = path.resolve(resource); const stat = fs.statSync(file); if (!stat.isFile()) { - reject(new Error(`The file could not be found: ${file}`)); - return; + throw new Error(`The file could not be found: ${file}`); } fs.readFile(file, (err, data) => { diff --git a/src/client/voice/ClientVoiceManager.js b/src/client/voice/ClientVoiceManager.js index 82ba39824..3120c4e0a 100644 --- a/src/client/voice/ClientVoiceManager.js +++ b/src/client/voice/ClientVoiceManager.js @@ -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) {