Refactor three if statements into one if statement
This commit is contained in:
parent
0bd6e4d076
commit
30710ade0b
1 changed files with 1 additions and 3 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue