From 6c91b2791ae5afed919614d9e0999418f361ecff Mon Sep 17 00:00:00 2001 From: Noah Date: Sun, 19 Dec 2021 13:02:43 -0600 Subject: [PATCH 1/9] Fix users can't send messages --- Commands/ticket.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Commands/ticket.js b/Commands/ticket.js index da4b170..b199d3b 100644 --- a/Commands/ticket.js +++ b/Commands/ticket.js @@ -121,7 +121,6 @@ module.exports = new Command({ { id: Author.id, allow: [Permissions.FLAGS.VIEW_CHANNEL], - deny: [Permissions.FLAGS.SEND_MESSAGES], }, { id: interaction.guild.id, @@ -135,6 +134,11 @@ module.exports = new Command({ VIEW_CHANNEL: true, }); } + if (supportbot.TicketDepartments) { + ticketChannel.permissionOverwrites.edit(interaction.user.id, { + SEND_MESSAGES: false, + }); + } await TicketData.tickets.push({ id: ticketChannel.id, name: ticketChannel.name, From 373f43eac57d0a892da76d610770af302754d790 Mon Sep 17 00:00:00 2001 From: Noah Date: Sun, 19 Dec 2021 13:03:33 -0600 Subject: [PATCH 2/9] Channel can now be id or name --- Events/ready.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Events/ready.js b/Events/ready.js index a8e845c..a17b2f0 100644 --- a/Events/ready.js +++ b/Events/ready.js @@ -137,8 +137,9 @@ module.exports = new Event("ready", async (client) => { ); } if (panelconfig.TicketPanel) { - let chan1 = client.channels.cache.find( - (channel) => channel.name === panelconfig.Channel + let chan1 = await client.getChannel( + panelconfig.Channel, + client.guilds.cache.first() ); if (!chan1) { From 9e7ec9f1bd48583a83ff18eebaa5f7fa43bbe3f9 Mon Sep 17 00:00:00 2001 From: Noah Date: Sun, 19 Dec 2021 13:06:32 -0600 Subject: [PATCH 3/9] 7.4.2 --- Configs/supportbot.yml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Configs/supportbot.yml b/Configs/supportbot.yml index 762c84b..3795178 100644 --- a/Configs/supportbot.yml +++ b/Configs/supportbot.yml @@ -10,7 +10,7 @@ # Discord Support: https://emeraldsrv.dev/discord # Community Resources: https://emeraldsrv.dev/resources -SupportBot_Version: "7.4.0" +SupportBot_Version: "7.4.2" # ------------------------- # General Configuration diff --git a/package-lock.json b/package-lock.json index 32aafc8..7dcca2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "supportbot", - "version": "7.4.1", + "version": "7.4.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "supportbot", - "version": "7.4.1", + "version": "7.4.2", "license": "MIT", "dependencies": { "discord.js": "^13.3.1", diff --git a/package.json b/package.json index 6ae1e85..cbb063d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "supportbot", - "version": "7.4.1", + "version": "7.4.2", "description": "SupportBot is an open-sourced support system for discord. It's completely free to use with high amounts of customization to match your own brand.", "main": "index.js", "scripts": { From 9aed6b8f35cefb057dfe40e5f4746510d1604796 Mon Sep 17 00:00:00 2001 From: Kieran Davies Date: Thu, 23 Dec 2021 11:36:14 +0000 Subject: [PATCH 4/9] Updated Documentation URLs + Added invite URL to log upon launch. --- Events/ready.js | 8 +++++++- README.md | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Events/ready.js b/Events/ready.js index a17b2f0..f7235dd 100644 --- a/Events/ready.js +++ b/Events/ready.js @@ -38,6 +38,12 @@ module.exports = new Event("ready", async (client) => { `\u001b[36m`, `Connected to Discord` ); + console.log( + `\u001b[33m`, + `Invite to your server:`, + `\u001b[36m`, + `https://discord.com/api/oauth2/authorize?client_id=` + client.user.id + `&permissions=8&scope=bot%20applications.commands` + ); console.log( `\u001b[33m`, `Resources:`, @@ -48,7 +54,7 @@ module.exports = new Event("ready", async (client) => { `\u001b[33m`, `Documentation:`, `\u001b[36m`, - `https://supportbot.emeraldsrv.dev` + `https://emeraldsrv.dev/wiki/supportbot` ); console.log( `\u001b[33m`, diff --git a/README.md b/README.md index 8e9e13e..4772114 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,6 @@ SupportBot is an open-sourced support system for discord. It's completely free t **|** [Discord](https://emeraldsrv.dev/discord) **|** [Hosting](https://emeraldsrv.dev/hosting) **|** -[Documentation](https://docs.emeraldsrv.dev) **|** +[Documentation](https://emeraldsrv.dev/wiki/supportbot) **|** [Download via Polymart](https://polymart.org/resource/supportbot-1-discord-ticket-bot.518) **|** [Download via MC-Market](https://www.mc-market.org/resources/8940/) **|** From bbb7443ef29ad5a66ecd3c19e50b28d1645b618e Mon Sep 17 00:00:00 2001 From: Noah Date: Tue, 28 Dec 2021 19:06:35 -0600 Subject: [PATCH 5/9] Fix suggest command --- Commands/suggest.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Commands/suggest.js b/Commands/suggest.js index e29ac30..7132569 100644 --- a/Commands/suggest.js +++ b/Commands/suggest.js @@ -20,6 +20,7 @@ module.exports = new Command({ name: "suggestion", description: "Create a Suggestion", type: "STRING", + required: true, }, ], permissions: ["SEND_MESSAGES"], From b5341b023fc083a7472bccea389e1a57c0988702 Mon Sep 17 00:00:00 2001 From: Noah Date: Wed, 29 Dec 2021 10:20:29 -0600 Subject: [PATCH 6/9] Fix embed command --- Commands/embed.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Commands/embed.js b/Commands/embed.js index c9083ff..51014c0 100644 --- a/Commands/embed.js +++ b/Commands/embed.js @@ -20,12 +20,14 @@ module.exports = new Command({ name: "title", description: "Embed Title", type: "STRING", + required: true, }, { name: "message", description: "Embed Message", type: "STRING", + required: true, }, ], permissions: ["SEND_MESSAGES"], From 7fddeeec37ad295f5627a7acfb8502d6e7231366 Mon Sep 17 00:00:00 2001 From: Noah Date: Mon, 10 Jan 2022 17:48:31 -0600 Subject: [PATCH 7/9] Change Max to 100 --- Commands/close.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Commands/close.js b/Commands/close.js index 7c7d27a..26e74b8 100644 --- a/Commands/close.js +++ b/Commands/close.js @@ -125,7 +125,7 @@ module.exports = new Command({ ) .addField("Closed By", interaction.user.tag) .addField("Reason", reason); - let msgs = await interaction.channel.messages.fetch(); + let msgs = await interaction.channel.messages.fetch({ limit: 100 }); let html = ""; msgs = msgs.sort((a, b) => a.createdTimestamp - b.createdTimestamp); From dcba3312dd5a9a92f7b9cb94759662b36cc19ee2 Mon Sep 17 00:00:00 2001 From: Noah Date: Sat, 29 Jan 2022 23:57:10 -0600 Subject: [PATCH 8/9] Misc --- Commands/add.js | 8 +- Commands/close.js | 16 +- Commands/embed.js | 2 +- Commands/help.js | 8 +- Commands/remove.js | 18 +- Commands/suggest.js | 6 +- Configs/ticket-panel.yml | 2 +- Events/guildCreate.js | 2 +- Events/guildDelete.js | 2 +- Structures/Client.js | 46 +++--- index.js | 1 - package-lock.json | 346 ++++++++++++++------------------------- package.json | 2 +- 13 files changed, 175 insertions(+), 284 deletions(-) diff --git a/Commands/add.js b/Commands/add.js index b011048..595aac4 100644 --- a/Commands/add.js +++ b/Commands/add.js @@ -26,7 +26,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel, getCategory } = interaction.client; + const { getRole} = interaction.client; let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); if (!SupportStaff || !Admin) @@ -51,9 +51,9 @@ module.exports = new Command({ fs.readFileSync("./Data/TicketData.json", "utf8") ); let ticket = await TicketData.tickets.findIndex( - (t) => t.id == interaction.channel.id + (t) => t.id === interaction.channel.id ); - if (ticket == -1) { + if (ticket === -1) { const Exists = new Discord.MessageEmbed() .setTitle("No Ticket Found!") .setDescription(`${supportbot.NoValidTicket}`) @@ -71,7 +71,7 @@ module.exports = new Command({ if (!uMember) return interaction.reply({ embeds: [UserNotExist] }); - interaction.channel.permissionOverwrites.edit(uMember.id, { + await interaction.channel.permissionOverwrites.edit(uMember.id, { VIEW_CHANNEL: true, }); const Complete = new Discord.MessageEmbed() diff --git a/Commands/close.js b/Commands/close.js index 26e74b8..1b52052 100644 --- a/Commands/close.js +++ b/Commands/close.js @@ -25,7 +25,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel, getCategory } = interaction.client; + const { getRole, getChannel} = interaction.client; if (supportbot.StaffOnly) { let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); @@ -51,10 +51,10 @@ module.exports = new Command({ fs.readFileSync("./Data/TicketData.json", "utf8") ); let TicketData = await tickets.tickets.findIndex( - (t) => t.id == interaction.channel.id + (t) => t.id === interaction.channel.id ); let ticket = tickets.tickets[TicketData]; - if (TicketData == -1) { + if (TicketData === -1) { const Exists = new Discord.MessageEmbed() .setTitle("No Ticket Found!") .setDescription(`${supportbot.NoValidTicket}`) @@ -81,8 +81,8 @@ module.exports = new Command({ .setColor(supportbot.EmbedColour); await interaction.followUp({ embeds: [CloseTicketRequest] }); let filter = (m) => - m.content.toLowerCase() == supportbot.ClosingConfirmation_Word && - m.author.id == interaction.user.id; + m.content.toLowerCase() === supportbot.ClosingConfirmation_Word && + m.author.id === interaction.user.id; await interaction.channel.awaitMessages({ filter, max: 1, @@ -162,9 +162,9 @@ module.exports = new Command({ }); if (ticket.subUsers) { ticket.subUsers.forEach(async (subUser) => { - interaction.client.users.cache - .get(subUser) - .send({ embeds: [transcriptEmbed], files: [file] }); + await interaction.client.users.cache + .get(subUser) + .send({embeds: [transcriptEmbed], files: [file]}); }); } await interaction.channel.delete().catch(async (error) => { diff --git a/Commands/embed.js b/Commands/embed.js index 51014c0..b49e249 100644 --- a/Commands/embed.js +++ b/Commands/embed.js @@ -33,7 +33,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel, getCategory } = interaction.client; + const { getRole} = interaction.client; let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); diff --git a/Commands/help.js b/Commands/help.js index 9b3e595..0d83613 100644 --- a/Commands/help.js +++ b/Commands/help.js @@ -12,12 +12,6 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8")); const Command = require("../Structures/Command.js"); -async function asyncForEach(array, callback) { - for (let index = 0; index < array.length; index++) { - await callback(array[index], index, array); - } -} - module.exports = new Command({ name: cmdconfig.HelpCommand, description: cmdconfig.HelpCommandDesc, @@ -25,7 +19,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel, getCategory } = interaction.client; + const { getRole} = interaction.client; let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); if (!SupportStaff || !Admin) diff --git a/Commands/remove.js b/Commands/remove.js index 5084835..5120239 100644 --- a/Commands/remove.js +++ b/Commands/remove.js @@ -12,12 +12,6 @@ const cmdconfig = yaml.load(fs.readFileSync("./Configs/commands.yml", "utf8")); const Command = require("../Structures/Command.js"); -async function asyncForEach(array, callback) { - for (let index = 0; index < array.length; index++) { - await callback(array[index], index, array); - } -} - module.exports = new Command({ name: cmdconfig.TicketRemove, description: cmdconfig.TicketRemoveDesc, @@ -32,7 +26,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel, getCategory } = interaction.client; + const { getRole} = interaction.client; let Staff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); if (!Staff || !Admin) @@ -56,9 +50,9 @@ module.exports = new Command({ fs.readFileSync("./Data/TicketData.json", "utf8") ); let ticket = await TicketData.tickets.findIndex( - (t) => t.id == interaction.channel.id + (t) => t.id === interaction.channel.id ); - if (ticket == -1) { + if (ticket === -1) { const Exists = new Discord.MessageEmbed() .setTitle("No Ticket Found!") .setDescription(`${supportbot.NoValidTicket}`) @@ -76,8 +70,8 @@ module.exports = new Command({ if (!uMember) return interaction.reply({ embeds: [UserNotExist] }); - interaction.channel.permissionOverwrites.edit(uMember.id, { - VIEW_CHANNEL: false, + await interaction.channel.permissionOverwrites.edit(uMember.id, { + VIEW_CHANNEL: false, }); const Complete = new Discord.MessageEmbed() @@ -88,7 +82,7 @@ module.exports = new Command({ interaction.reply({ embeds: [Complete] }); TicketData.tickets[ticket].subUsers = TicketData.tickets[ ticket - ].subUsers.filter((u) => u != uMember.id); + ].subUsers.filter((u) => u !== uMember.id); fs.writeFileSync( "./Data/TicketData.json", JSON.stringify(TicketData, null, 4), diff --git a/Commands/suggest.js b/Commands/suggest.js index 7132569..61cf9f4 100644 --- a/Commands/suggest.js +++ b/Commands/suggest.js @@ -26,7 +26,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel, getCategory } = interaction.client; + const { getChannel} = interaction.client; const suggestChannel = await getChannel( supportbot.SuggestionChannel, interaction.guild @@ -50,8 +50,8 @@ module.exports = new Command({ const suggestionMsg = await suggestChannel.send({ embeds: [SuggestEmbed] }); if (supportbot.SuggestionUpvote && supportbot.SuggestionDownvote) { - suggestionMsg.react(supportbot.SuggestionUpvote); - suggestionMsg.react(supportbot.SuggestionDownvote); + await suggestionMsg.react(supportbot.SuggestionUpvote); + await suggestionMsg.react(supportbot.SuggestionDownvote); } const Submitted = new Discord.MessageEmbed() diff --git a/Configs/ticket-panel.yml b/Configs/ticket-panel.yml index 10f37bf..b774882 100644 --- a/Configs/ticket-panel.yml +++ b/Configs/ticket-panel.yml @@ -25,7 +25,7 @@ ButtonEmoji: "📩" ButtonLabel: "Open Ticket" ButtonColour: "SUCCESS" # Colour Options: -# -> PRIMARY - Blurple +# -> PRIMARY - Purple # -> SECONDARY - Grey # -> SUCCESS - Green # -> DANGER - Red diff --git a/Events/guildCreate.js b/Events/guildCreate.js index fb1f1b3..16bd038 100644 --- a/Events/guildCreate.js +++ b/Events/guildCreate.js @@ -1,5 +1,5 @@ const Event = require("../Structures/Event.js"); -module.exports = new Event("guildCreate", async (client, guild) => { +module.exports = new Event("guildCreate", async (client) => { console.log( `\u001b[31m`, `${client.user.username} is not in the correct server set in your config. Please leave all other servers and restart the bot.` diff --git a/Events/guildDelete.js b/Events/guildDelete.js index f1b5ca1..d3cfbd2 100644 --- a/Events/guildDelete.js +++ b/Events/guildDelete.js @@ -1,6 +1,6 @@ const Event = require("../Structures/Event.js"); -module.exports = new Event("guildDelete", async (client, guild) => { +module.exports = new Event("guildDelete", async (client) => { console.log( `\u001b[31m`, `${client.user.username} is not in the correct server set in your config. Please join the server and restart the bot.` diff --git a/Structures/Client.js b/Structures/Client.js index a0db27f..e9cf6a6 100644 --- a/Structures/Client.js +++ b/Structures/Client.js @@ -37,14 +37,14 @@ class Client extends Discord.Client { ); } - start(token) { + async start(token) { const commandFiles = fs - .readdirSync("./Commands") - .filter((file) => file.endsWith(".js")); + .readdirSync("./Commands") + .filter((file) => file.endsWith(".js")); const addonFiles = fs - .readdirSync("./Addons") - .filter((file) => file.endsWith(".js")); + .readdirSync("./Addons") + .filter((file) => file.endsWith(".js")); const addons = addonFiles.map((file) => { let addon = require(`../Addons/${file}`); @@ -69,12 +69,12 @@ class Client extends Discord.Client { addons.forEach((addon) => { console.log( - `\u001b[33m`, - `[ADDON]`, - `\u001b[31;1m`, - `${addon.name}`, - `\u001b[32;1m`, - "Loaded" + `\u001b[33m`, + `[ADDON]`, + `\u001b[31;1m`, + `${addon.name}`, + `\u001b[32;1m`, + "Loaded" ); addon.commands.forEach((command) => { this.commands.set(command.name, command); @@ -91,8 +91,8 @@ class Client extends Discord.Client { this.once("ready", async () => { await this.application?.commands.set(this.commands, supportbot.Guild); console.log( - `\u001b[32;1m`, - `Slash Commands Registered for ${this.guilds.cache.first().name}` + `\u001b[32;1m`, + `Slash Commands Registered for ${this.guilds.cache.first().name}` ); }); @@ -100,20 +100,20 @@ class Client extends Discord.Client { console.log(`\u001b[34;1m`, "▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬"); fs.readdirSync("./Events") - .filter((file) => file.endsWith(".js")) - .forEach((file) => { - const event = require(`../Events/${file}`); - console.log(`\u001b[31;1m`, `${event.event}`, `\u001b[32;1m`, "Loaded"); - this.on(event.event, (...args) => event.run(this, ...args)); - }); + .filter((file) => file.endsWith(".js")) + .forEach((file) => { + const event = require(`../Events/${file}`); + console.log(`\u001b[31;1m`, `${event.event}`, `\u001b[32;1m`, "Loaded"); + this.on(event.event, (...args) => event.run(this, ...args)); + }); console.log(`\u001b[34;1m`, "▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬"); - if (process.argv[2] != "test") { - this.login(token); + if (process.argv[2] !== "test") { + await this.login(token); } else { console.log( - `\u001b[31;1m`, - "RUNNING IN TEST MODE, IF NOT INTENDED, PLEASE USE npm start" + `\u001b[31;1m`, + "RUNNING IN TEST MODE, IF NOT INTENDED, PLEASE USE npm start" ); } } diff --git a/index.js b/index.js index db39ccc..207b926 100644 --- a/index.js +++ b/index.js @@ -12,7 +12,6 @@ const fs = require("fs"); -const Discord = require("discord.js"); const yaml = require("js-yaml"); const supportbot = yaml.load( fs.readFileSync("./Configs/supportbot.yml", "utf8") diff --git a/package-lock.json b/package-lock.json index 7dcca2a..97c748d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,20 +9,20 @@ "version": "7.4.2", "license": "MIT", "dependencies": { - "discord.js": "^13.3.1", + "discord.js": "^13.6.0", "js-yaml": "^4.1.0" } }, "node_modules/@discordjs/builders": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz", - "integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz", + "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==", "dependencies": { "@sindresorhus/is": "^4.2.0", - "discord-api-types": "^0.24.0", - "ow": "^0.27.0", + "discord-api-types": "^0.26.0", "ts-mixer": "^6.0.0", - "tslib": "^2.3.1" + "tslib": "^2.3.1", + "zod": "^3.11.6" }, "engines": { "node": ">=16.0.0", @@ -30,40 +30,27 @@ } }, "node_modules/@discordjs/collection": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz", - "integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz", + "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==", "engines": { "node": ">=16.0.0", "npm": ">=7.0.0" } }, - "node_modules/@discordjs/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@sapphire/async-queue": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz", - "integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.2.0.tgz", + "integrity": "sha512-O5ND5Ljpef86X5oy8zXorQ754TMjWALcPSAgPBu4+76HLtDTrNoDyzU2uGE2G4A8Wv51u0MXHzGQ0WZ4GMtpIw==", "engines": { "node": ">=v14.0.0", "npm": ">=7.0.0" } }, "node_modules/@sindresorhus/is": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz", - "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz", + "integrity": "sha512-QppPM/8l3Mawvh4rn9CNEYIU9bxpXUCRMaX9yUpvBk1nMKusLKpfXGDEKExKaPhLzcn3lzil7pR6rnJ11HgeRQ==", "engines": { "node": ">=10" }, @@ -72,9 +59,9 @@ } }, "node_modules/@types/node": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz", - "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==" + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.13.tgz", + "integrity": "sha512-Y86MAxASe25hNzlDbsviXl8jQHb0RDvKt4c40ZJQ1Don0AAL0STLZSs4N+6gLEO55pedy7r2cLwS+ZDxPm/2Bw==" }, "node_modules/@types/node-fetch": { "version": "2.5.12", @@ -85,6 +72,19 @@ "form-data": "^3.0.0" } }, + "node_modules/@types/node-fetch/node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/@types/ws": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz", @@ -103,14 +103,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "engines": { - "node": ">=6" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -131,51 +123,37 @@ } }, "node_modules/discord-api-types": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz", - "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==", + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz", + "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==", "engines": { "node": ">=12" } }, "node_modules/discord.js": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz", - "integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz", + "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==", "dependencies": { - "@discordjs/builders": "^0.8.1", - "@discordjs/collection": "^0.3.2", - "@discordjs/form-data": "^3.0.1", - "@sapphire/async-queue": "^1.1.8", + "@discordjs/builders": "^0.11.0", + "@discordjs/collection": "^0.4.0", + "@sapphire/async-queue": "^1.1.9", "@types/node-fetch": "^2.5.12", - "@types/ws": "^8.2.0", - "discord-api-types": "^0.24.0", + "@types/ws": "^8.2.2", + "discord-api-types": "^0.26.0", + "form-data": "^4.0.0", "node-fetch": "^2.6.1", - "ws": "^8.2.3" + "ws": "^8.4.0" }, "engines": { "node": ">=16.6.0", "npm": ">=7.0.0" } }, - "node_modules/dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -185,14 +163,6 @@ "node": ">= 6" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "engines": { - "node": ">=8" - } - }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -204,11 +174,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, "node_modules/mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -229,33 +194,22 @@ } }, "node_modules/node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dependencies": { "whatwg-url": "^5.0.0" }, "engines": { "node": "4.x || >=6.0.0" - } - }, - "node_modules/ow": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", - "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", - "dependencies": { - "@sindresorhus/is": "^4.0.1", - "callsites": "^3.1.0", - "dot-prop": "^6.0.1", - "lodash.isequal": "^4.5.0", - "type-fest": "^1.2.1", - "vali-date": "^1.0.0" }, - "engines": { - "node": ">=12" + "peerDependencies": { + "encoding": "^0.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, "node_modules/tr46": { @@ -273,25 +227,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, - "node_modules/type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -307,9 +242,9 @@ } }, "node_modules/ws": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz", - "integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.4.2.tgz", + "integrity": "sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA==", "engines": { "node": ">=10.0.0" }, @@ -325,50 +260,48 @@ "optional": true } } + }, + "node_modules/zod": { + "version": "3.11.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.11.6.tgz", + "integrity": "sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg==", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } }, "dependencies": { "@discordjs/builders": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz", - "integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz", + "integrity": "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==", "requires": { "@sindresorhus/is": "^4.2.0", - "discord-api-types": "^0.24.0", - "ow": "^0.27.0", + "discord-api-types": "^0.26.0", "ts-mixer": "^6.0.0", - "tslib": "^2.3.1" + "tslib": "^2.3.1", + "zod": "^3.11.6" } }, "@discordjs/collection": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz", - "integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg==" - }, - "@discordjs/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz", + "integrity": "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==" }, "@sapphire/async-queue": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz", - "integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.2.0.tgz", + "integrity": "sha512-O5ND5Ljpef86X5oy8zXorQ754TMjWALcPSAgPBu4+76HLtDTrNoDyzU2uGE2G4A8Wv51u0MXHzGQ0WZ4GMtpIw==" }, "@sindresorhus/is": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz", - "integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==" + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz", + "integrity": "sha512-QppPM/8l3Mawvh4rn9CNEYIU9bxpXUCRMaX9yUpvBk1nMKusLKpfXGDEKExKaPhLzcn3lzil7pR6rnJ11HgeRQ==" }, "@types/node": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.0.tgz", - "integrity": "sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==" + "version": "17.0.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.13.tgz", + "integrity": "sha512-Y86MAxASe25hNzlDbsviXl8jQHb0RDvKt4c40ZJQ1Don0AAL0STLZSs4N+6gLEO55pedy7r2cLwS+ZDxPm/2Bw==" }, "@types/node-fetch": { "version": "2.5.12", @@ -377,6 +310,18 @@ "requires": { "@types/node": "*", "form-data": "^3.0.0" + }, + "dependencies": { + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } } }, "@types/ws": { @@ -397,11 +342,6 @@ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -416,49 +356,36 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "discord-api-types": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz", - "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==" + "version": "0.26.1", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz", + "integrity": "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==" }, "discord.js": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz", - "integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.6.0.tgz", + "integrity": "sha512-tXNR8zgsEPxPBvGk3AQjJ9ljIIC6/LOPjzKwpwz8Y1Q2X66Vi3ZqFgRHYwnHKC0jC0F+l4LzxlhmOJsBZDNg9g==", "requires": { - "@discordjs/builders": "^0.8.1", - "@discordjs/collection": "^0.3.2", - "@discordjs/form-data": "^3.0.1", - "@sapphire/async-queue": "^1.1.8", + "@discordjs/builders": "^0.11.0", + "@discordjs/collection": "^0.4.0", + "@sapphire/async-queue": "^1.1.9", "@types/node-fetch": "^2.5.12", - "@types/ws": "^8.2.0", - "discord-api-types": "^0.24.0", + "@types/ws": "^8.2.2", + "discord-api-types": "^0.26.0", + "form-data": "^4.0.0", "node-fetch": "^2.6.1", - "ws": "^8.2.3" - } - }, - "dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "requires": { - "is-obj": "^2.0.0" + "ws": "^8.4.0" } }, "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -467,11 +394,6 @@ "argparse": "^2.0.1" } }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" - }, "mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -486,26 +408,13 @@ } }, "node-fetch": { - "version": "2.6.6", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", - "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "requires": { "whatwg-url": "^5.0.0" } }, - "ow": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", - "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", - "requires": { - "@sindresorhus/is": "^4.0.1", - "callsites": "^3.1.0", - "dot-prop": "^6.0.1", - "lodash.isequal": "^4.5.0", - "type-fest": "^1.2.1", - "vali-date": "^1.0.0" - } - }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -521,16 +430,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, - "type-fest": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", - "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" - }, - "vali-date": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", - "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=" - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -546,10 +445,15 @@ } }, "ws": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.3.0.tgz", - "integrity": "sha512-Gs5EZtpqZzLvmIM59w4igITU57lrtYVFneaa434VROv4thzJyV6UjIL3D42lslWlI+D4KzLYnxSwtfuiO79sNw==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.4.2.tgz", + "integrity": "sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA==", "requires": {} + }, + "zod": { + "version": "3.11.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.11.6.tgz", + "integrity": "sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg==" } } } diff --git a/package.json b/package.json index cbb063d..573401a 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "homepage": "https://github.com/Emerald-Services/SupportBot#readme", "dependencies": { - "discord.js": "^13.3.1", + "discord.js": "^13.6.0", "js-yaml": "^4.1.0" } } From ebe29b403e49c1fd03241b8f86799c4cfd125dfd Mon Sep 17 00:00:00 2001 From: Noah Date: Sun, 30 Jan 2022 00:07:04 -0600 Subject: [PATCH 9/9] Prettier --- .github/workflows/node.js.yml | 2 +- Commands/add.js | 2 +- Commands/close.js | 6 +++--- Commands/embed.js | 2 +- Commands/help.js | 2 +- Commands/remove.js | 4 ++-- Commands/suggest.js | 2 +- Structures/Client.js | 40 +++++++++++++++++------------------ Structures/Command.js | 5 ----- 9 files changed, 30 insertions(+), 35 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index cd33b64..dac2401 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,4 +1,4 @@ -# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions name: Node.js CI diff --git a/Commands/add.js b/Commands/add.js index 595aac4..acce3f2 100644 --- a/Commands/add.js +++ b/Commands/add.js @@ -26,7 +26,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole} = interaction.client; + const { getRole } = interaction.client; let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); if (!SupportStaff || !Admin) diff --git a/Commands/close.js b/Commands/close.js index 1b52052..8f6d29a 100644 --- a/Commands/close.js +++ b/Commands/close.js @@ -25,7 +25,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole, getChannel} = interaction.client; + const { getRole, getChannel } = interaction.client; if (supportbot.StaffOnly) { let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); @@ -163,8 +163,8 @@ module.exports = new Command({ if (ticket.subUsers) { ticket.subUsers.forEach(async (subUser) => { await interaction.client.users.cache - .get(subUser) - .send({embeds: [transcriptEmbed], files: [file]}); + .get(subUser) + .send({ embeds: [transcriptEmbed], files: [file] }); }); } await interaction.channel.delete().catch(async (error) => { diff --git a/Commands/embed.js b/Commands/embed.js index b49e249..2ad25b2 100644 --- a/Commands/embed.js +++ b/Commands/embed.js @@ -33,7 +33,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole} = interaction.client; + const { getRole } = interaction.client; let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); diff --git a/Commands/help.js b/Commands/help.js index 0d83613..b913320 100644 --- a/Commands/help.js +++ b/Commands/help.js @@ -19,7 +19,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole} = interaction.client; + const { getRole } = interaction.client; let SupportStaff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); if (!SupportStaff || !Admin) diff --git a/Commands/remove.js b/Commands/remove.js index 5120239..1abf2cf 100644 --- a/Commands/remove.js +++ b/Commands/remove.js @@ -26,7 +26,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getRole} = interaction.client; + const { getRole } = interaction.client; let Staff = await getRole(supportbot.Staff, interaction.guild); let Admin = await getRole(supportbot.Admin, interaction.guild); if (!Staff || !Admin) @@ -71,7 +71,7 @@ module.exports = new Command({ if (!uMember) return interaction.reply({ embeds: [UserNotExist] }); await interaction.channel.permissionOverwrites.edit(uMember.id, { - VIEW_CHANNEL: false, + VIEW_CHANNEL: false, }); const Complete = new Discord.MessageEmbed() diff --git a/Commands/suggest.js b/Commands/suggest.js index 61cf9f4..e3363c1 100644 --- a/Commands/suggest.js +++ b/Commands/suggest.js @@ -26,7 +26,7 @@ module.exports = new Command({ permissions: ["SEND_MESSAGES"], async run(interaction) { - const { getChannel} = interaction.client; + const { getChannel } = interaction.client; const suggestChannel = await getChannel( supportbot.SuggestionChannel, interaction.guild diff --git a/Structures/Client.js b/Structures/Client.js index e9cf6a6..08520d3 100644 --- a/Structures/Client.js +++ b/Structures/Client.js @@ -39,12 +39,12 @@ class Client extends Discord.Client { async start(token) { const commandFiles = fs - .readdirSync("./Commands") - .filter((file) => file.endsWith(".js")); + .readdirSync("./Commands") + .filter((file) => file.endsWith(".js")); const addonFiles = fs - .readdirSync("./Addons") - .filter((file) => file.endsWith(".js")); + .readdirSync("./Addons") + .filter((file) => file.endsWith(".js")); const addons = addonFiles.map((file) => { let addon = require(`../Addons/${file}`); @@ -69,12 +69,12 @@ class Client extends Discord.Client { addons.forEach((addon) => { console.log( - `\u001b[33m`, - `[ADDON]`, - `\u001b[31;1m`, - `${addon.name}`, - `\u001b[32;1m`, - "Loaded" + `\u001b[33m`, + `[ADDON]`, + `\u001b[31;1m`, + `${addon.name}`, + `\u001b[32;1m`, + "Loaded" ); addon.commands.forEach((command) => { this.commands.set(command.name, command); @@ -91,8 +91,8 @@ class Client extends Discord.Client { this.once("ready", async () => { await this.application?.commands.set(this.commands, supportbot.Guild); console.log( - `\u001b[32;1m`, - `Slash Commands Registered for ${this.guilds.cache.first().name}` + `\u001b[32;1m`, + `Slash Commands Registered for ${this.guilds.cache.first().name}` ); }); @@ -100,20 +100,20 @@ class Client extends Discord.Client { console.log(`\u001b[34;1m`, "▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬"); fs.readdirSync("./Events") - .filter((file) => file.endsWith(".js")) - .forEach((file) => { - const event = require(`../Events/${file}`); - console.log(`\u001b[31;1m`, `${event.event}`, `\u001b[32;1m`, "Loaded"); - this.on(event.event, (...args) => event.run(this, ...args)); - }); + .filter((file) => file.endsWith(".js")) + .forEach((file) => { + const event = require(`../Events/${file}`); + console.log(`\u001b[31;1m`, `${event.event}`, `\u001b[32;1m`, "Loaded"); + this.on(event.event, (...args) => event.run(this, ...args)); + }); console.log(`\u001b[34;1m`, "▬▬▬▬▬▬▬ Events ▬▬▬▬▬▬▬"); if (process.argv[2] !== "test") { await this.login(token); } else { console.log( - `\u001b[31;1m`, - "RUNNING IN TEST MODE, IF NOT INTENDED, PLEASE USE npm start" + `\u001b[31;1m`, + "RUNNING IN TEST MODE, IF NOT INTENDED, PLEASE USE npm start" ); } } diff --git a/Structures/Command.js b/Structures/Command.js index 1dfaffe..eae47be 100644 --- a/Structures/Command.js +++ b/Structures/Command.js @@ -1,10 +1,6 @@ // SupportBot | Emerald Services // Command Structure -const fs = require("fs"); - -const yaml = require("js-yaml"); - class Command { constructor(options) { this.name = options.name; @@ -15,5 +11,4 @@ class Command { this.defaultPermission = true; } } - module.exports = Command;