beta push of muted check
push of a check if author has a muted role on ticket opening, if so, decline the interaction Also either check for missing role or not
This commit is contained in:
1 parent
69f0b00ed3
commit
979271cfb5
3 files changed
+13
-2
No files matched your search
+10
-2
@@ -68,8 +68,16 @@ module.exports = new Command({
|
||||
return interaction.reply({
|
||||
content: supportbot.TicketBlackListMessage,
|
||||
ephemeral: true,
|
||||
});
|
||||
}
|
||||
})
|
||||
} else if (User.roles.cache.has(
|
||||
getRole(supportbot.TicketMutedRole, interaction.guild).id
|
||||
)
|
||||
) {
|
||||
return interaction.reply({
|
||||
content: supportbot.TicketMutedMessage,
|
||||
ephemeral: true,
|
||||
})
|
||||
};
|
||||
|
||||
// Ticket ID
|
||||
let ticketNumberID = await TicketNumberID.pad();
|
||||
|
||||
@@ -52,6 +52,7 @@ JoinRole: "Member"
|
||||
Staff: "Staff"
|
||||
Admin: "Admin"
|
||||
TicketBlackListRole: "Blacklisted"
|
||||
TicketMutedRole: "Muted"
|
||||
|
||||
# ----------------------------
|
||||
# Join/Leave Configuration
|
||||
@@ -136,6 +137,7 @@ DMTranscripts: true
|
||||
TranscriptTitle: "Ticket Transcript"
|
||||
TicketLog_Title: "Ticket Closed"
|
||||
TicketBlackListMessage: "You are not allowed to open a ticket"
|
||||
TicketMutedMessage: "You are muted and therefore not allowed to open any tickets"
|
||||
TicketRoleMention: "@here"
|
||||
# To ping a role: <@ROLE_ID>
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ module.exports = new Event("ready", async (client, interaction) => {
|
||||
supportbot.Admin,
|
||||
supportbot.Staff,
|
||||
supportbot.TicketBlackListRole,
|
||||
supportbot?.TicketMutedRole
|
||||
];
|
||||
|
||||
supportbot.Departments.forEach((department) => roles.push(department.role));
|
||||
|
||||
Reference in new issue
Block a user