mirror of
https://github.com/chenasraf/venom.git
synced 2026-05-17 17:28:08 +00:00
fix: adjusted readability of the code
This commit is contained in:
@@ -17,23 +17,18 @@ const command: ICommand = {
|
||||
data.push('here\'s a list of all my commands:\n');
|
||||
|
||||
const cmds = commands.map(command => command.name);
|
||||
var cmd;
|
||||
let cmd;
|
||||
cmds.forEach(element => {
|
||||
cmd = commands.get(element) || commands.find(c => c.aliases && c.aliases.includes(element));
|
||||
var response = `\`${prefix}${cmd.name}\` `;
|
||||
if (cmd.description)
|
||||
{
|
||||
let response = `\`${prefix}${cmd.name}\` `;
|
||||
if (cmd.description) {
|
||||
response += `**${cmd.description}** `;
|
||||
}
|
||||
if (cmd.aliases)
|
||||
{
|
||||
if (cmd.aliases) {
|
||||
response += `\n\t\t\t*alternatively:* \`${prefix}${cmd.aliases.join(`\`, \`${prefix}`)}\``;
|
||||
}
|
||||
data.push(response);
|
||||
if (cmd.example)
|
||||
data.push(`\t\t\t*for example:* ${cmd.example}\n`);
|
||||
else
|
||||
data.push('')
|
||||
data.push(cmd.example ? `\t\t\t*for example:* ${cmd.example}\n` : '');
|
||||
});
|
||||
data.push(`\nYou can send \`${prefix}help [command name]\` to get info on a specific command!`);
|
||||
} else {
|
||||
@@ -51,7 +46,6 @@ const command: ICommand = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
//await message.author.send(data, { split: true });
|
||||
//if (message.channel.type === 'dm')
|
||||
|
||||
Reference in New Issue
Block a user