Refactor three if statements into one if statement

This commit is contained in:
SileNce5k 2021-05-24 16:47:51 +02:00
parent 0bd6e4d076
commit 30710ade0b
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -51,9 +51,7 @@ client.on('message', async message => {
const commandName = args.shift().toLowerCase(); const commandName = args.shift().toLowerCase();
const command = client.commands.get(commandName); const command = client.commands.get(commandName);
const netModule = client.netmodules.get(commandName); const netModule = client.netmodules.get(commandName);
if (!message.guild) return; if (!message.guild || message.author.bot || !message.content.startsWith(prefix)) return;
if (message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
if (!command){ if (!command){
if (netModule){ if (netModule){
try { try {