Update ticket.js
This commit is contained in:
1 parent
3336824df7
commit
e4cc0d960e
1 file changed
+3
@@ -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',
|
||||
|
||||
Reference in new issue
Block a user