mirror of
https://github.com/keanuplayz/TravBot-v3.git
synced 2024-08-15 02:33:12 +00:00
Added a simple help command.
Currently does nothing yet.
This commit is contained in:
parent
3033b791f5
commit
58787c907c
1 changed files with 27 additions and 0 deletions
27
src/Commands/Utilities/Help.js
Normal file
27
src/Commands/Utilities/Help.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
const Command = require('../../Structures/Command');
|
||||||
|
const { MessageEmbed } = require('discord.js');
|
||||||
|
|
||||||
|
module.exports = class extends Command {
|
||||||
|
|
||||||
|
constructor(...args) {
|
||||||
|
super(...args, {
|
||||||
|
aliases: ['help', 'halp']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(message, [command]) {
|
||||||
|
const embed = new MessageEmbed()
|
||||||
|
.setColor('BLUE')
|
||||||
|
.setAuthor(`${message.guild.name} Help Menu`, message.guild.iconURL({ dynamic: true }))
|
||||||
|
.setThumbnail(this.client.user.displayAvatarURL())
|
||||||
|
.setFooter(`Requested by ${message.author.username}`, message.author.displayAvatarURL({ dynamic: true }))
|
||||||
|
.setTimestamp();
|
||||||
|
|
||||||
|
if (command) {
|
||||||
|
const cmd = this.client.commands.get(command) || this.client.command.get(this.aliases.get(command));
|
||||||
|
|
||||||
|
if (!cmd) return message.channel.send(`\`${command}\` is not a valid command.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
Loading…
Reference in a new issue