From 28ec96e5e8ab9d0deb2f017943be3140c4b46c1b Mon Sep 17 00:00:00 2001 From: ItzEmerald Date: Tue, 2 Feb 2021 17:15:24 +0000 Subject: [PATCH] SB-6.1-PRE --- addons/addon-example.js | 2 +- addons/settings/exampleaddon.yml | 2 +- commands/newticket.js | 22 ++++++++++++++++++---- index.js | 2 ++ package.json | 4 ++-- storage/SupportTickets.json | 2 +- storage/TicketID.json | 2 +- supportbot-config.yml | 9 ++++++++- 8 files changed, 34 insertions(+), 11 deletions(-) diff --git a/addons/addon-example.js b/addons/addon-example.js index b17ff96..0ce670d 100755 --- a/addons/addon-example.js +++ b/addons/addon-example.js @@ -1,4 +1,4 @@ -// SupportBot 6.0, Created by Emerald Services +// SupportBot, Created by Emerald Services // Help Command const Discord = require("discord.js"); diff --git a/addons/settings/exampleaddon.yml b/addons/settings/exampleaddon.yml index 91876a0..4891ba4 100755 --- a/addons/settings/exampleaddon.yml +++ b/addons/settings/exampleaddon.yml @@ -1,5 +1,5 @@ # -# SupportBot 6.0 +# SupportBot, Created by Emerald Services # Example Addon # diff --git a/commands/newticket.js b/commands/newticket.js index 522b0c2..ce6f64d 100755 --- a/commands/newticket.js +++ b/commands/newticket.js @@ -87,7 +87,11 @@ module.exports = { } // Ticket Created, Message Sent - SupportTicket.send(`<@${message.author.id}>`) + + if (supportbot.AllowTicketMentions === "true") { + SupportTicket.send(`<@${message.author.id}>`) + } + const TicketMessage = new Discord.MessageEmbed() .setTitle(supportbot.Ticket_Title.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username)) .setDescription(supportbot.TicketMessage.replace(/%ticketauthor%/g, message.author.id).replace(/%ticketid%/g, SupportTicket.id).replace(/%ticketusername%/g, message.author.username)) @@ -146,7 +150,10 @@ module.exports = { .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_1} Department**. Please provide us information regarding your query.`) .setColor(supportbot.EmbedColour) SupportTicket.send({ embed: Department1 }); - SupportTicket.send(`@here`) + + if (supportbot.AllowTicketMentions === "true") { + SupportTicket.send(`@here`) + } } @@ -167,7 +174,10 @@ module.exports = { .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_2} Department**. Please provide us information regarding your query.`) .setColor(supportbot.EmbedColour) SupportTicket.send({ embed: Department2 }); - SupportTicket.send(`@here`) + + if (supportbot.AllowTicketMentions === "true") { + SupportTicket.send(`@here`) + } } @@ -189,7 +199,11 @@ module.exports = { .setTitle(`> Thank for reaching out to the **${supportbot.DepartmentTitle_3} Department**. Please provide us information regarding your query.`) .setColor(supportbot.EmbedColour) SupportTicket.send({ embed: Department3 }); - SupportTicket.send(`@here`) + + if (supportbot.AllowTicketMentions === "true") { + SupportTicket.send(`@here`) + } + } return [Emoji_1, Emoji_2, Emoji_3].includes(reaction.emoji.name) && user.id !== message.author.id; } diff --git a/index.js b/index.js index 0727bb9..16f973b 100755 --- a/index.js +++ b/index.js @@ -8,6 +8,8 @@ // SupportBot version 6.1 // Created by Emerald Services // Installed with MIT License +// +// Support Server: discord.gg/jspKFcE const Discord = require("discord.js"); const fs = require("fs"); diff --git a/package.json b/package.json index 9b91303..20bcdb2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "supportbot", - "version": "6.0.0", + "version": "6.1", "description": "SupportBot | #1 Self-Hosted Ticket Bot", "main": "index.js", "dependencies": { @@ -23,5 +23,5 @@ "bugs": { "url": "https://github.com/1tzemerald/SupportBot/issues" }, - "homepage": "https://emeraldservices.xyz" + "homepage": "https://emeraldsrv.dev" } diff --git a/storage/SupportTickets.json b/storage/SupportTickets.json index 728bc85..4a23eeb 100755 --- a/storage/SupportTickets.json +++ b/storage/SupportTickets.json @@ -1,4 +1,4 @@ { - "ticket": "ticket-0010", + "ticket": "ticket-0012", "id":419821884431925260 } \ No newline at end of file diff --git a/storage/TicketID.json b/storage/TicketID.json index d204bec..454e421 100755 --- a/storage/TicketID.json +++ b/storage/TicketID.json @@ -3,6 +3,6 @@ "id": 65 }, "805909541979029524": { - "id": 11 + "id": 13 } } \ No newline at end of file diff --git a/supportbot-config.yml b/supportbot-config.yml index f42319d..ba05675 100755 --- a/supportbot-config.yml +++ b/supportbot-config.yml @@ -8,10 +8,12 @@ # SupportBot version 6.1 # Created by Emerald Services # Installed with MIT License +# +# Support Server: discord.gg/jspKFcE # General Bot Configuration -Token: "BOT_TOKEN" +Token: "BOT_TOKEN_HERE" Prefix: "-" Bot_Name: "SupportBot" @@ -52,6 +54,11 @@ TranscriptLog: "transcripts" TicketSubject: "description" # TicketSubject: "description" means that the subject (reason) of the ticket will be displayed upon the channel description if set to "embed" it will be displayed within the embed. +AllowTicketMentions: "true" +# Set to "true" to allow the ticket to mention the author and the support team. +# Set to "false" to dis-allow mentions within tickets. + + # Ticket Panel (Ticket Reaction Create) ReactionTickets: "true"