mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
Update close.js
Fix permission issue. Previously anyone added to a ticket could close it, whereas the expected functionality was that owner the creator or staff could close it. Thanks @iFusionFr for reporting the issue.
This commit is contained in:
parent
7c01fedb71
commit
af11904359
@ -59,6 +59,8 @@ module.exports = {
|
|||||||
return message.channel.send(notTicket);
|
return message.channel.send(notTicket);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (message.author.id !== ticket.creator && !message.member.roles.cache.has(config.staff_role))
|
if (message.author.id !== ticket.creator && !message.member.roles.cache.has(config.staff_role))
|
||||||
return message.channel.send(
|
return message.channel.send(
|
||||||
new MessageEmbed()
|
new MessageEmbed()
|
||||||
@ -70,7 +72,6 @@ module.exports = {
|
|||||||
.addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`)
|
.addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`)
|
||||||
.setFooter(guild.name, guild.iconURL())
|
.setFooter(guild.name, guild.iconURL())
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
let success;
|
let success;
|
||||||
let pre = fs.existsSync(`user/transcripts/text/${channel.id}.txt`) ||
|
let pre = fs.existsSync(`user/transcripts/text/${channel.id}.txt`) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user