mirror of
https://github.com/musix-org/musix-oss
synced 2024-11-10 05:10:17 +00:00
Mention commands
This commit is contained in:
parent
8810b6c01c
commit
161b88d020
@ -16,13 +16,16 @@ module.exports = {
|
|||||||
);
|
);
|
||||||
if (args[2] === "=" && args[3]) return (prefix = args[3]);
|
if (args[2] === "=" && args[3]) return (prefix = args[3]);
|
||||||
}
|
}
|
||||||
if (args[1] === "help") {
|
args.shift();
|
||||||
const command = client.commands.get("help");
|
getCommand(client, args, msg, Discord);
|
||||||
return client.funcs.exe(msg, args, client, Discord, prefix, command);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!msg.content.startsWith(prefix)) return;
|
if (!msg.content.startsWith(prefix)) return;
|
||||||
|
getCommand(client, args, msg, Discord);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
function getCommand(client, args, msg, Discord) {
|
||||||
if (!args[0]) return;
|
if (!args[0]) return;
|
||||||
const commandName = args[0].toLowerCase();
|
const commandName = args[0].toLowerCase();
|
||||||
if (commandName === "none") return;
|
if (commandName === "none") return;
|
||||||
@ -32,10 +35,9 @@ module.exports = {
|
|||||||
(cmd) => cmd.aliases && cmd.aliases.includes(commandName)
|
(cmd) => cmd.aliases && cmd.aliases.includes(commandName)
|
||||||
) ||
|
) ||
|
||||||
client.commandAliases.get(commandName);
|
client.commandAliases.get(commandName);
|
||||||
if (!command && msg.content !== `${prefix}`) return;
|
if (!command) return;
|
||||||
if (command.onlyDev && msg.author.id !== client.config.devId) return;
|
if (command.onlyDev && msg.author.id !== client.config.devId) return;
|
||||||
if (client.config.devMode && msg.member.id !== client.config.devId)
|
if (client.config.devMode && msg.member.id !== client.config.devId)
|
||||||
return msg.channel.send(client.messages.devMode);
|
return msg.channel.send(client.messages.devMode);
|
||||||
client.funcs.exe(msg, args, client, Discord, command);
|
client.funcs.exe(msg, args, client, Discord, command);
|
||||||
},
|
}
|
||||||
};
|
|
||||||
|
Loading…
Reference in New Issue
Block a user