Close Ticket

This commit is contained in:
ItzEmerald committed 2020-06-24 09:50:14 +01:00
1 parent ff7ed49905
commit cf99209887
3 files changed
+32 -4

No files matched your search

+16 -4
View File
@@ -14,12 +14,24 @@ module.exports = {
execute(message, args) { execute(message, args) {
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`); console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
if (supportbot.Close === "staff") { if (!message.channel.name.startsWith( `${TicketChannel}-` )) {
member.roles.cache.has(``) const Exists = new Discord.MessageEmbed()
} .setTitle("Incorrect Channel")
.setDescription(`:warning: You cannot execute this command here. This command is used when closing a ticket.`)
.setColor(supportbot.WarningColour);
message.channel.send({ embed: Exists });
if (supportbot.Close === "user") { return;
} }
if (supportbot.CloseConfirmation === "true") {
const CloseTicketRequest = new Discord.MessageEmbed()
.setDescription(`**${supportbot.ClosingTicket}**`)
.addField("Please confirm by repeating the following word..", `**${supportbot.ClosingConfirmation_Word}**`)
}
} }
}; };
+8
View File
@@ -18,6 +18,9 @@ Bot_Name: "SupportBot DEV"
BotActivity: "SB-6.0 dev-0.1" BotActivity: "SB-6.0 dev-0.1"
ActivityType: "PLAYING" ActivityType: "PLAYING"
ShowErrorCodes: "true"
# This feature will show supportbot error codes such as "SB-01"
# Embed Configuration # Embed Configuration
EmbedColour: "#04b545" EmbedColour: "#04b545"
@@ -53,6 +56,11 @@ TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%
TicketPanel: true TicketPanel: true
ReactionForTicket: 🎫 ReactionForTicket: 🎫
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: true
Transcripts: true
# Ticket Department Configuration # Ticket Department Configuration
TicketDepartments: true TicketDepartments: true
+8
View File
@@ -0,0 +1,8 @@
const rolerequired = new Discord.MessageEmbed()
.setTitle("SupportBot Error!")
.setDescription(`:x: **Error!** Incorrect Permissions, You cannot execute this command as you do not have the required role.\n\nRole Required: \`${supportbot.StaffRole}\`\n`)
.setColor(supportbot.ErrorColour);
if (supportbot.ShowErrorCodes === "true") {
rolerequired.addField("Error Code", "SB-02")
}