xD
All checks were successful
Deploy bot / build-and-deploy (push) Successful in 14s

This commit is contained in:
2025-08-08 00:29:15 +02:00
parent 49cb0b37da
commit 45d2b2c352
4 changed files with 17 additions and 15 deletions

View File

@ -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] });