Move checks before other things

No need to do other things before this check.
This commit is contained in:
SileNce5k 2024-03-07 10:53:52 +01:00
parent 53358531e5
commit b539f41d51
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -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 {