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