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
+33 -5

No files matched your search

+17 -5
View File
@@ -13,13 +13,25 @@ module.exports = {
execute(message, args) {
console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`);
if (supportbot.Close === "staff") {
member.roles.cache.has(``)
}
if (supportbot.Close === "user") {
if (!message.channel.name.startsWith( `${TicketChannel}-` )) {
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 });
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"
ActivityType: "PLAYING"
ShowErrorCodes: "true"
# This feature will show supportbot error codes such as "SB-01"
# Embed Configuration
EmbedColour: "#04b545"
@@ -53,6 +56,11 @@ TicketCreatedAlert: ":ticket: Your support ticket has been created: <#%ticketid%
TicketPanel: true
ReactionForTicket: 🎫
ClosingTicket: ":warning: You have requested to close your support ticket."
ClosingConfirmation_Word: "confirm"
CloseConfirmation: true
Transcripts: true
# Ticket Department Configuration
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")
}