imposter help discord fix yes

This commit is contained in:
ChomeNS 2023-03-13 09:30:15 +07:00
parent 6241e9a81d
commit 1dc7ee8a49

View file

@ -105,12 +105,24 @@ module.exports = {
if (command.alias.toString() !== '') { if (command.alias.toString() !== '') {
alias = command.alias.join(', ') alias = command.alias.join(', ')
} }
const usage = []
if (typeof command.usage === 'string') {
usage.push(`${prefix}${command.name} ${command.usage}`)
} else {
for (const value of command.usage) {
usage.push(`${prefix}${command.name} ${value}`)
usage.push('\n')
}
usage.pop()
}
const Embed = new EmbedBuilder() const Embed = new EmbedBuilder()
.setColor(config.discord.embedsColors.normal) .setColor(config.discord.embedsColors.normal)
.setTitle(`${prefix + command.name} (${alias}) - ${command.description}`) .setTitle(`${prefix + command.name} (${alias}) - ${command.description}`)
.setDescription(`Trust level: ${command.trusted} .setDescription(`Trust level: ${command.trusted}
Supported: ${command.discordExecute ? 'true' : 'false'} Supported: ${command.discordExecute ? 'true' : 'false'}
${prefix + command.name} ${command.usage}` ${usage}`
) )
channeldc.send({ embeds: [Embed] }) channeldc.send({ embeds: [Embed] })
} }