From 95063398aab02e6170aa1403f7f4381b333463c7 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:39:25 -0400 Subject: [PATCH 01/13] Update message.js --- events/message.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/events/message.js b/events/message.js index f3a92fb..800ea86 100644 --- a/events/message.js +++ b/events/message.js @@ -19,6 +19,4 @@ module.exports = async (bot, message) => { const cmd = bot.commands.get(command); if(!cmd) return; cmd.execute(message, args); - message.delete(); - -}; \ No newline at end of file +}; From b5cf721efbea06cfdd7101debb14b8c43af89111 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:42:39 -0400 Subject: [PATCH 02/13] Update supportbot-config.yml --- supportbot-config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/supportbot-config.yml b/supportbot-config.yml index 91d324a..70cdae8 100644 --- a/supportbot-config.yml +++ b/supportbot-config.yml @@ -19,6 +19,8 @@ BotActivity: "!help ~ SupportBot 6.0" ActivityType: "PLAYING" # Activity status can either be PLAYING, WATCHING or LISTENING. +DeleteMessages: "true" + # Embed Configuration EmbedColour: "#04b545" @@ -183,4 +185,4 @@ IncorrectPerms: ":x: **Err!** You do not have the correct permissions to use thi InvalidChannel: ":x: **Err!** Channel not found. Please create it!" UserNotFound: ":x: **Err!** This user doesn't exist, Are they in this server?" NoValidTicket: ":warning: You cannot execute this command here. This command is used when closing a ticket." -TicketExists: ":warning: This ticket cannot be opened, It already exists!" \ No newline at end of file +TicketExists: ":warning: This ticket cannot be opened, It already exists!" From a3c0e81e040c4c3693acb285bd2143d7f94cddad Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:42:53 -0400 Subject: [PATCH 03/13] Update addUser.js --- commands/addUser.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/addUser.js b/commands/addUser.js index d30ca34..62ef5d5 100644 --- a/commands/addUser.js +++ b/commands/addUser.js @@ -11,7 +11,8 @@ module.exports = { name: supportbot.AddUser, description: supportbot.AddUserDesc, - execute(message, args) { + execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.AddUser}!`); let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) @@ -61,4 +62,4 @@ module.exports = { } } -}; \ No newline at end of file +}; From 31bad3c2e59a13f8f25c870d0902973825b7cf99 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:11 -0400 Subject: [PATCH 04/13] Update suggest.js --- commands/suggest.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/suggest.js b/commands/suggest.js index 7ffd398..118f45d 100644 --- a/commands/suggest.js +++ b/commands/suggest.js @@ -12,6 +12,8 @@ module.exports = { description: supportbot.SuggestionDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); + let locateChannel = message.guild.channels.cache.find(SuggestionChannel => SuggestionChannel.name === supportbot.SuggestionChannel); const errornochannel = new Discord.MessageEmbed() @@ -55,4 +57,4 @@ module.exports = { }); } -}; \ No newline at end of file +}; From d4576dfc21a8749cc5e5819197e83fadd3987d37 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:17 -0400 Subject: [PATCH 05/13] Update removeUser.js --- commands/removeUser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/removeUser.js b/commands/removeUser.js index 34cb52f..61e9990 100644 --- a/commands/removeUser.js +++ b/commands/removeUser.js @@ -12,6 +12,8 @@ module.exports = { description: supportbot.RemoveUserDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.RemoveUser}!`); let SupportStaff = message.guild.roles.cache.find(SupportTeam => SupportTeam.name === supportbot.Staff) @@ -59,4 +61,4 @@ module.exports = { } } -}; \ No newline at end of file +}; From 75bed3f5dda9b0ac71ba060d99ce5ca4d5b32271 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:25 -0400 Subject: [PATCH 06/13] Update ping.js --- commands/ping.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/ping.js b/commands/ping.js index e69206c..f476a2b 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -12,6 +12,8 @@ module.exports = { description: supportbot.PingDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); + let ping = Date.now() - message.createdTimestamp + " ms"; const PingCommandEmbed = new Discord.MessageEmbed() @@ -20,4 +22,4 @@ module.exports = { message.channel.send({ embed: PingCommandEmbed }); } -}; \ No newline at end of file +}; From f9da25643dc654058be41ee82e415b3f52a2eeea Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:30 -0400 Subject: [PATCH 07/13] Update newticket.js --- commands/newticket.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/newticket.js b/commands/newticket.js index 7d8514f..d93eae1 100644 --- a/commands/newticket.js +++ b/commands/newticket.js @@ -14,6 +14,8 @@ module.exports = { description: supportbot.NewTicketDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.NewTicket}!`); // Ticket ID From 5631b24a144be02cd99439201d260aea426b3d56 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:36 -0400 Subject: [PATCH 08/13] Update links.js --- commands/links.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/links.js b/commands/links.js index 4282cad..4f3746f 100644 --- a/commands/links.js +++ b/commands/links.js @@ -13,6 +13,7 @@ module.exports = { description: supportbot.LinksDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); const LinksEmbed = new Discord.MessageEmbed() .setColor(supportbot.EmbedColour) @@ -30,4 +31,4 @@ module.exports = { message.channel.send({ embed: LinksEmbed }); } -}; \ No newline at end of file +}; From 51ad35f72b7c4e144dd8139890b3f287dda76b5d Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:45 -0400 Subject: [PATCH 09/13] Update help.js --- commands/help.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/help.js b/commands/help.js index 4a54852..bfe65d6 100644 --- a/commands/help.js +++ b/commands/help.js @@ -12,6 +12,8 @@ module.exports = { description: supportbot.HelpDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); + let generalCommands = ""; generalCommands += `**${supportbot.Prefix}${supportbot.HelpCommand}** ${supportbot.HelpDesc}\n`; generalCommands += `**${supportbot.Prefix}${supportbot.LinksCommand}** ${supportbot.LinkDesc}\n`; From ceddd503f8520d1903d37d723d94cd689f7f43d0 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:51 -0400 Subject: [PATCH 10/13] Update close.js --- commands/close.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/close.js b/commands/close.js index d45fae6..3610fe6 100644 --- a/commands/close.js +++ b/commands/close.js @@ -13,6 +13,8 @@ module.exports = { description: supportbot.CloseTicketDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); + console.log(`\u001b[32m`, `[${supportbot.Bot_Name}]:`, `\u001b[32m`, `${message.author.tag} has executed ${supportbot.Prefix}${supportbot.CloseTicket}!`); if (!message.channel.name.startsWith( `${supportbot.TicketChannel}-` )) { @@ -144,4 +146,4 @@ module.exports = { } } -}; \ No newline at end of file +}; From 8432290a70d835c29229cb9a6e8aba9932a5a675 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:43:59 -0400 Subject: [PATCH 11/13] Update botSay.js --- commands/botSay.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/botSay.js b/commands/botSay.js index c90df2c..1e930b5 100644 --- a/commands/botSay.js +++ b/commands/botSay.js @@ -13,7 +13,8 @@ module.exports = { description: supportbot.BotSayDesc, execute(message, args) { - + if (supportbot.DeleteMessages == "true") message.delete(); + let SupportStaff = message.guild.roles.cache.find(adminRole => adminRole.name === supportbot.Staff); const NoPerms = new Discord.MessageEmbed() @@ -47,4 +48,4 @@ module.exports = { } -}; \ No newline at end of file +}; From f23f15c9725775fbda0b34c45f5115b7d00d2808 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:44:06 -0400 Subject: [PATCH 12/13] Update announce.js --- commands/announce.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/announce.js b/commands/announce.js index fff1a6e..a6e1f68 100644 --- a/commands/announce.js +++ b/commands/announce.js @@ -13,7 +13,9 @@ module.exports = { description: supportbot.AnnounceDesc, execute(message, args) { - + + if (supportbot.DeleteMessages == "true") message.delete(); + let locateChannel = message.guild.channels.cache.find(AnnouncementChannel => AnnouncementChannel.name === supportbot.AnnouncementChannel); const errornochannel = new Discord.MessageEmbed() @@ -65,4 +67,4 @@ module.exports = { } -}; \ No newline at end of file +}; From 366203fe21320aa20de976153ea752eee34c8405 Mon Sep 17 00:00:00 2001 From: Two Date: Mon, 27 Jul 2020 10:45:25 -0400 Subject: [PATCH 13/13] Update addon-example.js --- addons/addon-example.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/addon-example.js b/addons/addon-example.js index 76ec67b..b17ff96 100644 --- a/addons/addon-example.js +++ b/addons/addon-example.js @@ -14,6 +14,7 @@ module.exports = { description: example.ExampleAddonDesc, execute(message, args) { + if (supportbot.DeleteMessages == "true") message.delete(); message.channel.send(example.ExampleAddonMessage) } -}; \ No newline at end of file +};