2024-02-05 19:18:42 -05:00
|
|
|
module.exports = {
|
|
|
|
name: 'help',
|
|
|
|
description: 'List all of my commands or info about a specific command.',
|
|
|
|
execute(message, args, deleteTimeout) {
|
2024-02-05 22:38:35 -05:00
|
|
|
let reply = '```';
|
|
|
|
reply += 'Here are the available commands:\n\n';
|
|
|
|
|
2024-02-05 19:18:42 -05:00
|
|
|
const commands = Array.from(message.client.commands.values());
|
2024-02-05 22:38:35 -05:00
|
|
|
commands.forEach(command => {
|
|
|
|
reply += `.${command.name} - ${command.description}\n`;
|
|
|
|
});
|
|
|
|
|
|
|
|
reply += '```';
|
2024-02-05 19:18:42 -05:00
|
|
|
|
|
|
|
message.channel.send(reply).then(sentMessage => {
|
|
|
|
setTimeout(() => sentMessage.delete().catch(console.error), deleteTimeout);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|