better looking help command
This commit is contained in:
parent
a6ce102e05
commit
2aa72c0ea2
1 changed files with 9 additions and 5 deletions
|
@ -7,12 +7,12 @@ module.exports = {
|
|||
name: 'help',
|
||||
description: 'List all available commands.',
|
||||
execute(message) {
|
||||
let str = '';
|
||||
var commands = ""
|
||||
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
|
||||
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setColor(15780145)
|
||||
.setTitle("Help")
|
||||
.setTitle("Commands")
|
||||
.setTimestamp()
|
||||
.setAuthor("soilens bot", "https://cdn.discordapp.com/avatars/481128222147477506/1a30f57f8e403f54aaca502012aeff14.png?size=2048")
|
||||
|
||||
|
@ -20,10 +20,14 @@ module.exports = {
|
|||
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`./${file}`);
|
||||
embed.addFields(
|
||||
{ name: prefix+command.name, value: command.description },
|
||||
)
|
||||
console.log(command.name)
|
||||
var commands = commands + `${prefix}${command.name} | ${command.description}\n`
|
||||
|
||||
|
||||
}
|
||||
embed.addFields(
|
||||
{ name: "General",value: commands},
|
||||
)
|
||||
|
||||
message.channel.send(embed);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue