Update ticket.js

This commit is contained in:
ItzEmerald authored and GitHub committed 2020-01-05 15:33:23 +00:00
1 parent 3336824df7
commit e4cc0d960e
1 file changed
+3
+3
View File
@@ -15,6 +15,9 @@ exports.run = (bot, message, args) => {
const alreadyopen = new Discord.RichEmbed()
.setDescription(`:x: Cannot create a ticket because **${bot.settings.Ticket_Channel_Name}-${message.author.username}** already exists.`)
.setColor(bot.settings.colour)
if (message.guild.channels.exists('name', `${bot.settings.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
if (message.guild.channels.find(TicketChannel => TicketChannel.name === `${bot.settings.Ticket_Channel_Name}-` + message.author.username)) return message.channel.send(alreadyopen);
message.guild.createChannel(`${bot.settings.Ticket_Channel_Name}-${message.author.username}`, {
type: 'text',