make le help command better

This commit is contained in:
Luna 2021-06-18 12:14:16 -03:00
parent 460772b5ec
commit f0f914ec96

View file

@ -4,11 +4,12 @@ module.exports.desc = "get help for commands or something idk";
module.exports.exec = function (vanillaclient, client, server, args) { module.exports.exec = function (vanillaclient, client, server, args) {
if(args[0] && commands.includes(`${args[0]}.js`)) { if(args[0] && commands.includes(`${args[0]}.js`)) {
let cmd = require(`./${args[0]}`); let cmd = require(`./${args[0]}`);
vanillaclient.chat(`${args[0]} - ${cmd.desc}`); vanillaclient.chat(`§7Help for: §6${args[0]}`)
vanillaclient.chat(`§6${args[0]}§7: §3${cmd.desc}`);
} else if(!args[0]) { } else if(!args[0]) {
commands.forEach(function(command) { commands.forEach(function(command) {
let cmd = require(`./${command}`); let cmd = require(`./${command}`);
vanillaclient.chat(`${command.replace(".js","")} - ${cmd.desc}`); vanillaclient.chat(`§6${command.replace(".js","")}§7: §3${cmd.desc}`);
}); });
} else { } else {
vanillaclient.chat("§4Command not found. :("); vanillaclient.chat("§4Command not found. :(");