DiscordTickets/commands/help.js

34 lines
997 B
JavaScript
Raw Normal View History

2019-05-04 01:42:29 +03:00
const Discord = require('discord.js');
2019-05-04 01:54:28 +03:00
const { version } = require('../package.json');
2019-05-04 02:01:33 +03:00
const config = require('../config.json');
2019-05-04 00:09:48 +03:00
module.exports = {
2019-05-04 01:54:28 +03:00
name: 'help',
description: 'Displays help menu',
usage: '[command]',
aliases: ['command', 'commands'],
2019-05-04 14:20:26 +03:00
example: 'help new',
2019-05-04 01:54:28 +03:00
args: false,
2019-05-04 02:01:33 +03:00
cooldown: config.cooldown,
execute(message, args) {
2019-05-04 01:54:28 +03:00
const client = message.client;
2019-05-04 00:09:48 +03:00
// command starts here
message.delete();
2019-05-04 01:54:28 +03:00
if (config.useEmbeds) {
2019-05-04 00:09:48 +03:00
const embed = new Discord.RichEmbed()
2019-05-04 01:42:29 +03:00
.setAuthor(`${client.user.username} / Commands`, client.user.avatarURL)
2019-05-04 01:54:28 +03:00
.setColor(config.colour)
2019-05-04 01:42:29 +03:00
.addField("...", `...`, true)
.addField("...", `...`, true)
2019-05-04 00:52:55 +03:00
.setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`);
2019-05-04 01:54:28 +03:00
message.channel.send({
embed
})
2019-05-04 00:09:48 +03:00
} else {
message.channel.send(`**Prefix =** \`${config.prefix}\`\n**Bot Version =** \`${version}\``)
}
// command ends here
2019-05-04 01:54:28 +03:00
},
2019-05-04 00:09:48 +03:00
};