Merge pull request #62 from DuAnti7423/master

Blacklist Role
This commit is contained in:
ItzEmerald authored and GitHub committed 2021-05-07 15:09:46 +01:00
commit 8ce2d4269d
2 files changed
+11

No files matched your search

+9
View File
@@ -21,6 +21,15 @@ module.exports = {
if (!message.channel.name === supportbot.ReactionChannel) {
if (supportbot.DeleteMessages == "true") message.delete();
}
let reactionUser = message.guild.members.cache.get(message.author.id)
if (reactionUser.roles.cache.find(role => role.name === supportbot.TicketBlackListRole) || reactionUser.roles.cache.find(role => role.id === supportbot.TicketBlackListRole)) {
return message.channel.send(`<@${message.author.id}> ${supportbot.TicketBlackListMessage}`).then(msg => {
msg.delete({timeout: 3500})
})
}
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.NewTicket}!`);
+2
View File
@@ -44,6 +44,7 @@ LockdownRole: "@everyone"
Staff: "Staff"
Admin: "Administration"
TicketBlackListRole: "Blacklisted"
# Ticket Configuration
@@ -78,6 +79,7 @@ TicketMessage: "Hello <@%ticketauthor%>, Thank you for creating a support ticket
NoTicketSubject: "No Reason Provided!"
TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%>"
TranscriptTitle: "Ticket Transcript"
TicketBlackListMessage: "You are not allowed to open a ticket"
AddedUser: "👍 <@%user%> has been added to this ticket"
RemovedUser: "👍 <@%user%> has been removed from this ticket"