Move checks before other things
No need to do other things before this check.
This commit is contained in:
parent
53358531e5
commit
b539f41d51
1 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,9 @@ module.exports = function(client, owners, message, globalPrefix){
|
|||
if (serverPrefix) {
|
||||
prefix = serverPrefix;
|
||||
}
|
||||
|
||||
if (!message.guild || message.author.bot || !message.content.startsWith(prefix)) return;
|
||||
|
||||
if(message.content.startsWith(`<@${client.user.id}>`)){
|
||||
let regex = new RegExp("(<@" + client.user.id + ">) *")
|
||||
message.content = message.content.replace(regex, prefix);
|
||||
|
@ -16,7 +19,6 @@ module.exports = function(client, owners, message, globalPrefix){
|
|||
const commandName = args.shift().toLowerCase();
|
||||
const command = client.commands.get(commandName);
|
||||
const netModule = client.netmodules.get(commandName);
|
||||
if (!message.guild || message.author.bot || !message.content.startsWith(prefix)) return;
|
||||
if (!command){
|
||||
if (netModule){
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue