mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-10 06:43:08 +02:00
28 lines
902 B
JavaScript
28 lines
902 B
JavaScript
module.exports = {
|
|
name: 'new',
|
|
description: 'Create a new ticket',
|
|
usage: 'new [brief description]',
|
|
execute(message, args, config, version) {
|
|
// 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")
|
|
.setColour
|
|
.addField("Username", message.author.tag, true)
|
|
.addField("Channel", ticketChannel, true)
|
|
.setFooter(`${client.guilds.get(config.guildID).name} / Ticket Bot\nDiscordTickets 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
|
|
},
|
|
};
|