✨ Bug fixes & update (v3.0.0)
This commit is contained in:
48
commands/core/help.js
Normal file
48
commands/core/help.js
Normal file
@@ -0,0 +1,48 @@
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
aliases: ['h'],
|
||||
category: 'Core',
|
||||
utilisation: '{prefix}help <command name>',
|
||||
|
||||
execute(client, message, args) {
|
||||
if (!args[0]) {
|
||||
const infos = message.client.commands.filter(c => c.category == 'Infos').map((c) => '`' + c.name + '`').join(', ');
|
||||
const music = message.client.commands.filter(c => c.category == 'Music').map((c) => '`' + c.name + '`').join(', ');
|
||||
|
||||
message.channel.send({
|
||||
embed: {
|
||||
color: 'ORANGE',
|
||||
author: { name: 'Help pannel' },
|
||||
footer: { text: 'This bot uses a Github project made by Zerio (ZerioDev/Music-bot)' },
|
||||
fields: [
|
||||
{ name: 'Bot', value: infos },
|
||||
{ name: 'Music', value: music },
|
||||
{ name: 'Filters', value: '`bassboost`, `8D`, `vaporwave`, `nightcore`, `phaser`, `tremolo`, `vibrato`, `reverse`, `treble`, `normalizer`, `surrounding`, `pulsator`, `subboost`, `karaoke`, `flanger`, `gate`, `haas`, `mcompand`' },
|
||||
],
|
||||
timestamp: new Date(),
|
||||
description: `To use filters, ${client.config.prefix}filter (the filter). Example : ${client.config.prefix}filter 8D.`,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
const command = message.client.commands.get(args.join(" ").toLowerCase()) || message.client.commands.find(c => c.aliases && c.aliases.includes(args.join(" ").toLowerCase()));
|
||||
|
||||
if (!command) return message.channel.send(`${client.emotes.error} - I did not find this command !`);
|
||||
|
||||
message.channel.send({
|
||||
embed: {
|
||||
color: 'ORANGE',
|
||||
author: { name: 'Help pannel' },
|
||||
footer: { text: 'This bot uses a Github project made by Zerio (ZerioDev/Music-bot)' },
|
||||
fields: [
|
||||
{ name: 'Name', value: command.name, inline: true },
|
||||
{ name: 'Category', value: command.category, inline: true },
|
||||
{ name: 'Aliase(s)', value: command.aliases.length < 1 ? 'None' : command.aliases.join('\n'), inline: true },
|
||||
{ name: 'Utilisation', value: command.utilisation.replace('{prefix}', client.config.prefix), inline: true },
|
||||
],
|
||||
timestamp: new Date(),
|
||||
description: 'Find information on the command provided.\nMandatory arguments `[]`, optional arguments `<>`.',
|
||||
}
|
||||
});
|
||||
};
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user