forked from embee/woomy
help is now cooler n stuff
This commit is contained in:
parent
b9b14a45d2
commit
b62f5aeef1
2 changed files with 13 additions and 8 deletions
|
@ -3,4 +3,4 @@ Bots now get a bot badge in the userinfo command
|
|||
Added dogfact and catfact command (terry)
|
||||
index.js now has better logging of when things fail to load/initialize (terry)
|
||||
added `dice`, rolls a 6 sided die (terry)
|
||||
Added two new events, disconnect.js and reconnection.js. Should log when the bot loses connection/reconnects to discord (terry)
|
||||
Help command changed, the amount of commands in each category and overall is now displayed
|
|
@ -4,6 +4,7 @@ exports.run = (client, message, args, level) => {
|
|||
|
||||
var ran = false;
|
||||
var output = "";
|
||||
var commands = 0;
|
||||
var prefix;
|
||||
var currentCategory;
|
||||
|
||||
|
@ -14,7 +15,7 @@ exports.run = (client, message, args, level) => {
|
|||
};
|
||||
|
||||
if(!args[0]) {
|
||||
embed.setTitle("Command list");
|
||||
embed.setTitle(`Commands [${client.commands.size}]`);
|
||||
embed.setDescription(`For more information on a specific command use \`${prefix}help <command>\`\nFor the full command list use \`${prefix}help all\`\n`);
|
||||
|
||||
const myCommands = message.guild ? client.commands.filter(
|
||||
|
@ -37,16 +38,18 @@ exports.run = (client, message, args, level) => {
|
|||
const cat = c.help.category.toProperCase();
|
||||
if (currentCategory !== cat) {
|
||||
if(ran == true) {
|
||||
embed.addField(currentCategory + ":", output.slice(0, -6))
|
||||
embed.addField(currentCategory + ` [${commands}]`, output.slice(0, -2))
|
||||
output = "";
|
||||
commands = 0;
|
||||
}
|
||||
currentCategory = cat;
|
||||
ran = true
|
||||
}
|
||||
output += `\`${prefix}${c.help.name}\`**,** `;
|
||||
output += `\`${prefix}${c.help.name}\`, `;
|
||||
commands = commands + 1;
|
||||
});
|
||||
|
||||
embed.addField(currentCategory + ":", output.slice(0, -6));
|
||||
embed.addField(currentCategory + ` [${commands}]`, output.slice(0, -2));
|
||||
|
||||
embed.addField(
|
||||
"Invite me",
|
||||
|
@ -84,16 +87,18 @@ exports.run = (client, message, args, level) => {
|
|||
const cat = c.help.category.toProperCase();
|
||||
if (currentCategory !== cat) {
|
||||
if(ran == true) {
|
||||
embed.addField(currentCategory + ":", output.slice(0, -6))
|
||||
embed.addField(currentCategory + ` [${commands}]`, output.slice(0, -2))
|
||||
output = "";
|
||||
commands = 0;
|
||||
}
|
||||
currentCategory = cat;
|
||||
ran = true
|
||||
}
|
||||
output += `\`${prefix}${c.help.name}\`**,** `;
|
||||
output += `\`${prefix}${c.help.name}\`, `;
|
||||
commands = commands + 1;
|
||||
});
|
||||
|
||||
embed.addField(currentCategory + ":", output.slice(0, -6));
|
||||
embed.addField(currentCategory + ` [${commands}]`, output.slice(0, -2));
|
||||
|
||||
embed.addField(
|
||||
"Invite me",
|
||||
|
|
Loading…
Reference in a new issue