diff --git a/Commands/help.js b/Commands/help.js index d71e831..f7371b6 100644 --- a/Commands/help.js +++ b/Commands/help.js @@ -32,7 +32,10 @@ module.exports = new Command({ botCommands += `**/${cmdconfig.InfoCommand}** ${cmdconfig.InfoCommandDesc}\n`; botCommands += `**/${cmdconfig.PingCommand}** ${cmdconfig.PingCommandDesc}\n`; botCommands += `**/${cmdconfig.UserInfoCommand}** ${cmdconfig.UserInfoCommandDesc}\n`; - botCommands += `**/${cmdconfig.SuggestCommand}** ${cmdconfig.SuggestCommandDesc}\n`; + + if (supportbot.Suggestions === false) { + botCommands += `**/${cmdconfig.SuggestCommand}** ${cmdconfig.SuggestCommandDesc}\n`; + } let ticketCommands = ""; ticketCommands += `**/${cmdconfig.OpenTicket}** ${cmdconfig.OpenTicketDesc}\n`; diff --git a/Commands/suggest.js b/Commands/suggest.js index 38e987a..7960beb 100644 --- a/Commands/suggest.js +++ b/Commands/suggest.js @@ -55,6 +55,16 @@ module.exports = new Command({ if (supportbot.SuggestionUpvote && supportbot.SuggestionDownvote) { await suggestionMsg.react(supportbot.SuggestionUpvote); await suggestionMsg.react(supportbot.SuggestionDownvote); + + if (supportbot.SuggestionThreads) { + await suggestionMsg.startThread({ + name: `Suggestion-releated Thread`, + autoArchiveDuration: 60, + type: 'GUILD_PUBLIC_THREAD', + reason: 'Suggestion-releated thread', + }) + + } } const Submitted = new Discord.MessageEmbed() @@ -65,6 +75,10 @@ module.exports = new Command({ .addField("Sent to:", `<#${suggestChannel.id}>`) .setColor(supportbot.SuccessColour); - return interaction.reply({ ephemeral: true, mbeds: [Submitted] }); + return interaction.reply({ + ephemeral: true, + embeds: [Submitted] + }) + }, }); diff --git a/Configs/supportbot.yml b/Configs/supportbot.yml index 7bfca3a..309eea3 100644 --- a/Configs/supportbot.yml +++ b/Configs/supportbot.yml @@ -10,14 +10,14 @@ # Discord Support: https://emeraldsrv.dev/discord # Community Resources: https://emeraldsrv.dev/resources -SupportBot_Version: "7.6" +SupportBot_Version: "7.7 BETA-v2" # ------------------------- # General Configuration # ------------------------- Name: "SupportBot" -Token: "TOKEN_HERE" +Token: "BOT_TOKEN_HERE" # ------------------------- # Activity Configuration @@ -58,7 +58,7 @@ InfoColour: "#f74343" # ------------------------- AutoRole: true -JoinRole: "Verified Member" +JoinRole: "Member" Staff: "Staff" Admin: "Admin" @@ -109,10 +109,16 @@ EmbedLeaveThumbnail: false # Suggestions Configuration # ---------------------------- +Suggestions: true +# Set to true to disable the suggestiosn feature. + SuggestionChannel: "suggestions" SuggestionUpvote: "✅" SuggestionDownvote: "❌" +SuggestionThreads: true +# set to false to disable threads being created from suggestions. + # ------------------------- # Translate Configuration # ------------------------- @@ -146,8 +152,6 @@ AllowTicketMentions: true AllowThanksForReachingOutMessage: true # Set to true to allow the "Thanks for reaching out Message" to be sent when the ticket is created -DisableSuggestionsChannel: false -# Set to true to disable the requirement of the "SuggestionChannel" DisableTicketLogChannel: false # Set to true to disable the requirement of the "TicketLog" # Set to true to also disable the ticket logs to be sent in the "TicketLogs" channel @@ -212,11 +216,13 @@ Departments: color: "SECONDARY" emoji: "1️⃣" category: "Billing Support" + - title: "Billing Support" role: "Staff" color: "SECONDARY" emoji: "2️⃣" category: "Admin Team" + - title: "Admin Team" role: "Admin" color: "SECONDARY" diff --git a/Structures/Client.js b/Structures/Client.js index 75c6044..5533cc4 100644 --- a/Structures/Client.js +++ b/Structures/Client.js @@ -39,9 +39,11 @@ class Client extends Discord.Client { async start(token) { var tempCommandFiles = fs.readdirSync("./Commands").filter((file) => file.endsWith(".js")); - if (supportbot.DisableSuggestionsChannel) { + + if (supportbot.Suggestions) { tempCommandFiles = tempCommandFiles.filter(item => item !== "suggest.js"); } + const commandFiles = tempCommandFiles; const addonFiles = fs