Merge pull request #126 from SypherRed/release

Muted Role check and issue fix
This commit is contained in:
Xiled Emerald authored and GitHub committed 2022-06-30 15:49:14 +01:00
commit b6ef0f95cb
4 files changed
+13 -9

No files matched your search

-1
View File
@@ -29,7 +29,6 @@ module.exports = new Command({
const InfoEmbed = new Discord.MessageEmbed() const InfoEmbed = new Discord.MessageEmbed()
.setURL(supportbot.InfoURL) .setURL(supportbot.InfoURL)
.setTitle(supportbot.InfoTitle) .setTitle(supportbot.InfoTitle)
.setDescription(supportbot.AboutMe)
.setColor(supportbot.InfoColour); .setColor(supportbot.InfoColour);
interaction.reply({ interaction.reply({
+9 -7
View File
@@ -60,16 +60,18 @@ module.exports = new Command({
ephemeral: true, ephemeral: true,
}); });
} }
if ( if (User.roles.cache.has(supportbot.TicketBlackListRole)) {
User.roles.cache.has(
getRole(supportbot.TicketBlackListRole, interaction.guild).id
)
) {
return interaction.reply({ return interaction.reply({
content: supportbot.TicketBlackListMessage, content: supportbot.TicketBlackListMessage,
ephemeral: true, ephemeral: true,
}); })
} };
if (User.roles.cache.has(supportbot.TicketMutedRole)) {
return interaction.reply({
content: supportbot.TicketMutedMessage,
ephemeral: true,
})
};
// Ticket ID // Ticket ID
let ticketNumberID = await TicketNumberID.pad(); let ticketNumberID = await TicketNumberID.pad();
+2
View File
@@ -52,6 +52,7 @@ JoinRole: "Member"
Staff: "Staff" Staff: "Staff"
Admin: "Admin" Admin: "Admin"
TicketBlackListRole: "Blacklisted" TicketBlackListRole: "Blacklisted"
TicketMutedRole: "Muted"
# ---------------------------- # ----------------------------
# Join/Leave Configuration # Join/Leave Configuration
@@ -136,6 +137,7 @@ DMTranscripts: true
TranscriptTitle: "Ticket Transcript" TranscriptTitle: "Ticket Transcript"
TicketLog_Title: "Ticket Closed" TicketLog_Title: "Ticket Closed"
TicketBlackListMessage: "You are not allowed to open a ticket" TicketBlackListMessage: "You are not allowed to open a ticket"
TicketMutedMessage: "You are muted and therefore not allowed to open any tickets"
TicketRoleMention: "@here" TicketRoleMention: "@here"
# To ping a role: <@ROLE_ID> # To ping a role: <@ROLE_ID>
+2 -1
View File
@@ -82,7 +82,8 @@ module.exports = new Event("ready", async (client, interaction) => {
const roles = [ const roles = [
supportbot.Admin, supportbot.Admin,
supportbot.Staff, supportbot.Staff,
supportbot.TicketBlackListRole, supportbot?.TicketBlackListRole,
supportbot?.TicketMutedRole
]; ];
supportbot.Departments.forEach((department) => roles.push(department.role)); supportbot.Departments.forEach((department) => roles.push(department.role));