mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor: remove unused error in catch statements (#3820)
* refactor(handlers): remove unused error in catch * refactor(PacketHandler): remove unused error * refactor(SecretBox): remove unused error * refactor(ClientPresence): remove unused error * style: remove space Co-Authored-By: Crawl <icrawltogo@gmail.com> Co-authored-by: Crawl <icrawltogo@gmail.com>
This commit is contained in:
@@ -90,7 +90,7 @@ class PacketHandler extends EventEmitter {
|
||||
this.connection.onSpeaking({ user_id: userStat.userID, ssrc: ssrc, speaking: 0 });
|
||||
this.receiver.connection.client.clearTimeout(speakingTimeout);
|
||||
this.speakingTimeouts.delete(ssrc);
|
||||
} catch (ex) {
|
||||
} catch {
|
||||
// Connection already closed, ignore
|
||||
}
|
||||
}, DISCORD_SPEAKING_DELAY);
|
||||
|
||||
@@ -27,6 +27,6 @@ exports.methods = {};
|
||||
if (libName === 'libsodium-wrappers' && lib.ready) await lib.ready; // eslint-disable-line no-await-in-loop
|
||||
exports.methods = libs[libName](lib);
|
||||
break;
|
||||
} catch (err) {} // eslint-disable-line no-empty
|
||||
} catch {} // eslint-disable-line no-empty
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -7,7 +7,7 @@ const handlers = {};
|
||||
for (const name of Object.keys(WSEvents)) {
|
||||
try {
|
||||
handlers[name] = require(`./${name}.js`);
|
||||
} catch (err) {} // eslint-disable-line no-empty
|
||||
} catch {} // eslint-disable-line no-empty
|
||||
}
|
||||
|
||||
module.exports = handlers;
|
||||
|
||||
@@ -39,7 +39,7 @@ class ClientPresence extends Presence {
|
||||
try {
|
||||
const a = await this.client.api.oauth2.applications(applicationID).assets.get();
|
||||
for (const asset of a) assets.set(asset.name, asset.id);
|
||||
} catch (err) { } // eslint-disable-line no-empty
|
||||
} catch {} // eslint-disable-line no-empty
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user