Change help menu format
This commit is contained in:
parent
fe06dbab3f
commit
fd0aa70556
|
@ -2,9 +2,15 @@ module.exports = {
|
||||||
name: 'help',
|
name: 'help',
|
||||||
description: 'List all of my commands or info about a specific command.',
|
description: 'List all of my commands or info about a specific command.',
|
||||||
execute(message, args, deleteTimeout) {
|
execute(message, args, deleteTimeout) {
|
||||||
let reply = 'Here are my supported commands:\n\n';
|
let reply = '```';
|
||||||
|
reply += 'Here are the available commands:\n\n';
|
||||||
|
|
||||||
const commands = Array.from(message.client.commands.values());
|
const commands = Array.from(message.client.commands.values());
|
||||||
reply += commands.map(command => `.${command.name} - ${command.description}`).join('\n');
|
commands.forEach(command => {
|
||||||
|
reply += `.${command.name} - ${command.description}\n`;
|
||||||
|
});
|
||||||
|
|
||||||
|
reply += '```';
|
||||||
|
|
||||||
message.channel.send(reply).then(sentMessage => {
|
message.channel.send(reply).then(sentMessage => {
|
||||||
setTimeout(() => sentMessage.delete().catch(console.error), deleteTimeout);
|
setTimeout(() => sentMessage.delete().catch(console.error), deleteTimeout);
|
||||||
|
|
Loading…
Reference in New Issue