This commit is contained in:
@ -1,7 +1,7 @@
|
||||
const { EmbedBuilder } = require("discord.js");
|
||||
exports.name = "help";
|
||||
exports.description =
|
||||
":scroll: Shows this message. (this bot is a crude imitation of tbolt's better bot :P)";
|
||||
":scroll: Shows this message and provides insight into other commands.";
|
||||
exports.usage = "<<help [optional other command]";
|
||||
exports.example = "<<help res";
|
||||
exports.hidden = false;
|
||||
@ -28,13 +28,15 @@ exports.run = (client, message, args) => {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
client.commands.forEach((cmd) => {
|
||||
if (cmd.hidden && message.author.id != client.ownerID) return;
|
||||
embed.addFields({
|
||||
name: cmd.name,
|
||||
value: cmd.description,
|
||||
[...client.commands.values()]
|
||||
.sort((a, b) => (a.name > b.name ? 1 : -1))
|
||||
.forEach((cmd) => {
|
||||
if (cmd.hidden && message.author.id != client.ownerID) return;
|
||||
embed.addFields({
|
||||
name: cmd.name,
|
||||
value: cmd.description,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
embed.setColor(0x00ff00);
|
||||
message.channel.send({ embeds: [embed] });
|
||||
|
Reference in New Issue
Block a user