DiscordTickets/commands/new.js
Eartharoid 61310e09b6 update
2019-05-03 23:54:28 +01:00

29 lines
892 B
JavaScript

module.exports = {
name: 'new',
description: 'Create a new ticket',
usage: '<brief description>',
aliases: ['ticket'],
args: true,
execute(message, args, config) {
// command starts here
message.delete();
const ticketChannel = "channel";
// log
if(config.useEmbeds) {
const embed = new Discord.RichEmbed()
.setAuthor(`${client.user.username} / Ticket Log`, client.user.avatarURL)
.setTitle("New Ticket")
.addField("Username", message.author.tag, true)
.addField("Channel", ticketChannel, true)
.setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`);
client.channels.get(config.logChannel).send({embed})
} else {
client.channels.get(config.logChannel).send(`New ticket created by **${message.author.tag} (${message.author.id})**`);
}
// command ends here
},
};