Created
July 8, 2017 18:01
-
-
Save Jackzmc/245ce0df59353f450f786bcaaea5ca16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (msg.content.charAt(0) == prefix && msg.content.charAt(1) !== "_") { | |
for(var i=0;i<commands.main.length;i++) { | |
if(commands.main[i].cmd === arg[0]){ | |
return commands.main[i].execute(msg,arg); | |
} | |
} | |
for(var i=0;i<custom_commands;i++) { | |
if(custom_commands[i].cmd === arg[0]){ | |
return custom_commands[i].execute(msg,arg); | |
} | |
} | |
for(var i=0;i<commands.secondary.length;i++) { | |
if(commands.secondary[i].cmd === arg[0]){ | |
return commands.secondary[i].execute(msg,arg); | |
} | |
} | |
msg.reply("Command was not found"); //should only run if forloop fails | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment