diff --git a/.gitignore b/.gitignore index 7ff7a3f..bb27f9b 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ typings/ # dotenv environment variables file .env +test.js diff --git a/docs/changelog.md b/docs/changelog.md index a552784..5a03d05 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,8 @@ ## Change log +**7.3.0 - Emergency fix for discord api [2022-04-28]** +- Discord broke everything without warning this fixes that + **7.2.1 - Fixes and support [2022-04-15]** - update links - added swedish from ayatollah diff --git a/docs/commands.md b/docs/commands.md index 7d5159b..d0db33b 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -80,8 +80,6 @@ There's currently only 3 permission tiers (mod, admin, god). Permissions are gra 3. Change what is in the quotes `" "` to the permission you want to access the command. ie. `role: "admin",` 4. save and restart the resource or server. -To remove permissions from a command all together where anyone can use them delete both the `default_permission:` and `role:` lines from the command - *Please note that permissions are synced across whole base commands so if you wanted `/money inspect` to be mod+ and `/money add` to be admin+ you'd need to separate them into separate commands to achieve that.* ### Add commands @@ -106,7 +104,6 @@ Adding commands can be really simple if you're familiar with javascript but very 3. If you wanted to make it so only admin or god could run your command you'd add the following 2 lines under your description line: ```js - default_permission: false, role: "admin", ``` @@ -141,44 +138,3 @@ Adding commands can be really simple if you're familiar with javascript but very **This resource itself** - Honestly there's so many features and practices being used actively here in commands and utils that you can take note from or in many cases just copy and paste and use so have at it and don't be afraid to break things to help learn more.. as long as you're not working on a live server while you're breaking things ;) -### Add permission levels - -By defaults there is mod, admin and god but if you wanted to add another level, for like trial mods, it's actually quite easy to do. In `bot.js`, at the bottom there's a section called `loadDiscordPermissions()`.
-It has 2 main parts, The role levels, which look like `const mod = { id:..`
-And the role table -```js -this.config.perms = { - "mod": [ mod, admin, god, own ], - "admin": [ admin, god, own ], ... -``` -you first would add a role level like: -```js -// You would replace "000000000000000" with the trialmod role id from discord -const trialmod = { id: "000000000000000", type: 1, permission: true }; -``` -then you would add it to the role table with all the other roles you want to inherit permissions from trialmod: -```js -this.config.perms = { - "trialmod": [ trialmod, mod, admin, god, own ], - "mod": [ mod, admin, god, own ], ... -``` - -Then in the command files for the commands you want trial mods to be able to access change what was like `role: "mod",` to `role: "trialmod",`, save and restart the resource or server. - -**Note:** If you don't add the extra role levels to the trialmod list those roles wont be able to access the commands set with `role: "trialmod"` - -**Full example:** -```js -loadDiscordPermissions() { - const mod = { id: this.config.DiscordModRoleId, type: 1, permission: true }; - const admin = { id: this.config.DiscordAdminRoleId, type: 1, permission: true }; - const god = { id: this.config.DiscordGodRoleId, type: 1, permission: true }; - const god2 = { id: "000000000000000000", type: 1, permission: true }; // Added - const own = { id: "142831624868855808", type: 2, permission: true }; - this.config.perms = { - "mod": [ mod, admin, god, god2, own ], // changed - "admin": [ admin, god, god2, own ], // changed - "god": [ god, god2, own ], // changed - }; -} -``` diff --git a/fxmanifest.lua b/fxmanifest.lua index e2f912f..63cf2e3 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -15,7 +15,7 @@ games { "gta5" } author "zfbx" description "Discord bot allowlist and more" repository "https://github.com/zfbx/zdiscord" -version "7.2.1" +version "7.3.0" license "CC-BY-NC-SA-4.0" lua54 'yes' diff --git a/package.json b/package.json index 4e60515..780cbe0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zdiscord", - "version": "7.2.1", + "version": "7.3.0", "description": "Advanced Discord Bot Allowlist that's simple to use", "main": "server.js", "scripts": { diff --git a/server/bot.js b/server/bot.js index 51cd695..85e161c 100644 --- a/server/bot.js +++ b/server/bot.js @@ -43,8 +43,6 @@ class Bot extends Client { this.utils.log.assert(!(this.utils.isValidID(this.config.DiscordGodRoleId)), "Your DiscordGodRoleId doesn't seem correct"); this.utils.log.assert(this.config.EnableStaffChatForwarding && !(this.utils.isValidID(this.config.DiscordStaffChannelId)), "Your DiscordStaffChannelId doesn't seem correct"); - this.loadDiscordPermissions(); - if (this.config.EnableDiscordSlashCommands) this.loadCommands(); this.loadEvents(); @@ -188,16 +186,22 @@ class Bot extends Client { return member.roles.cache.map(r => r.id); } - loadDiscordPermissions() { - const mod = { id: this.config.DiscordModRoleId, type: 1, permission: true }; - const admin = { id: this.config.DiscordAdminRoleId, type: 1, permission: true }; - const god = { id: this.config.DiscordGodRoleId, type: 1, permission: true }; - const own = { id: "142831624868855808", type: 2, permission: true }; - this.config.perms = { - "mod": [ mod, admin, god, own ], - "admin": [ admin, god, own ], - "god": [ god, own ], - }; + hasPermission(member, level) { + switch (level) { + case "mod": + return ( + member.roles.cache.has(this.config.DiscordModRoleId) || + member.roles.cache.has(this.config.DiscordAdminRoleId) || + member.roles.cache.has(this.config.DiscordGodRoleId)); + case "admin": + return ( + member.roles.cache.has(this.config.DiscordAdminRoleId) || + member.roles.cache.has(this.config.DiscordGodRoleId)); + case "god": + return (member.roles.cache.has(this.config.DiscordGodRoleId)); + default: + return true; + } } } diff --git a/server/commands/announcement.js b/server/commands/announcement.js index 068fc10..92a107e 100644 --- a/server/commands/announcement.js +++ b/server/commands/announcement.js @@ -12,7 +12,6 @@ module.exports = { name: "announcement", description: "Send in city announcement", - default_permission: false, role: "mod", options: [ diff --git a/server/commands/embed.js b/server/commands/embed.js index f9b1092..d88bf83 100644 --- a/server/commands/embed.js +++ b/server/commands/embed.js @@ -12,7 +12,6 @@ module.exports = { name: "embed", description: "Send an embedded (fancy) message in a specified channel", - default_permission: false, role: "god", options: [ diff --git a/server/commands/identifiers.js b/server/commands/identifiers.js index a6dac09..13cb9e2 100644 --- a/server/commands/identifiers.js +++ b/server/commands/identifiers.js @@ -12,7 +12,6 @@ module.exports = { name: "identifiers", description: "Get all of a player's identifiers", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/kick.js b/server/commands/kick.js index 32be8b2..aa22059 100644 --- a/server/commands/kick.js +++ b/server/commands/kick.js @@ -12,7 +12,6 @@ module.exports = { name: "kick", description: "Kick a player from the city", - default_permission: false, role: "mod", options: [ diff --git a/server/commands/kickall.js b/server/commands/kickall.js index c6cc9ad..08a75b5 100644 --- a/server/commands/kickall.js +++ b/server/commands/kickall.js @@ -12,7 +12,6 @@ module.exports = { name: "kickall", description: "Kick every player in the city", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/kill.js b/server/commands/kill.js index 81d16db..a2f23c2 100644 --- a/server/commands/kill.js +++ b/server/commands/kill.js @@ -12,7 +12,6 @@ module.exports = { name: "kill", description: "kill a player in city", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/message.js b/server/commands/message.js index 6482aa0..adbf36f 100644 --- a/server/commands/message.js +++ b/server/commands/message.js @@ -12,7 +12,6 @@ module.exports = { name: "message", description: "direct a message to a specific player", - default_permission: false, role: "mod", options: [ diff --git a/server/commands/players.js b/server/commands/players.js index 39847f1..61133f2 100644 --- a/server/commands/players.js +++ b/server/commands/players.js @@ -14,7 +14,6 @@ const { MessageButton } = require("discord.js"); module.exports = { name: "players", description: "Get list of current players in city", - default_permission: false, role: "mod", run: async (client, interaction) => { diff --git a/server/commands/qb-ban.js b/server/commands/qb-ban.js index f298fae..19e8541 100644 --- a/server/commands/qb-ban.js +++ b/server/commands/qb-ban.js @@ -12,7 +12,6 @@ module.exports = { name: "ban", description: "ban a player", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-clothingmenu.js b/server/commands/qb-clothingmenu.js index 6460f67..107749e 100644 --- a/server/commands/qb-clothingmenu.js +++ b/server/commands/qb-clothingmenu.js @@ -12,7 +12,6 @@ module.exports = { name: "clothing-menu", description: "Give a player the clothing menu", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-gang.js b/server/commands/qb-gang.js index 3616f8b..afbd2dc 100644 --- a/server/commands/qb-gang.js +++ b/server/commands/qb-gang.js @@ -12,7 +12,6 @@ module.exports = { name: "gang", description: "Manage player's in-city gang", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-inventory.js b/server/commands/qb-inventory.js index 27637af..6d0ca8a 100644 --- a/server/commands/qb-inventory.js +++ b/server/commands/qb-inventory.js @@ -12,7 +12,6 @@ module.exports = { name: "inventory", description: "Manage player's in-city items", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-jail.js b/server/commands/qb-jail.js index 21e3e2c..d15224b 100644 --- a/server/commands/qb-jail.js +++ b/server/commands/qb-jail.js @@ -12,7 +12,6 @@ module.exports = { name: "jail", description: "Manage a player's jail sentence", - default_permission: false, role: "mod", options: [ diff --git a/server/commands/qb-job.js b/server/commands/qb-job.js index 3022677..fe0e234 100644 --- a/server/commands/qb-job.js +++ b/server/commands/qb-job.js @@ -12,7 +12,6 @@ module.exports = { name: "job", description: "Manage player's in-city job", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-logout.js b/server/commands/qb-logout.js index b29fcfd..7661703 100644 --- a/server/commands/qb-logout.js +++ b/server/commands/qb-logout.js @@ -12,7 +12,6 @@ module.exports = { name: "logout", description: "send a player back to the character selection screen", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-money.js b/server/commands/qb-money.js index 96370b7..4db87df 100644 --- a/server/commands/qb-money.js +++ b/server/commands/qb-money.js @@ -12,7 +12,6 @@ module.exports = { name: "money", description: "Manage player's in-city money", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-permissions.js b/server/commands/qb-permissions.js index ec8eb81..da33d63 100644 --- a/server/commands/qb-permissions.js +++ b/server/commands/qb-permissions.js @@ -12,7 +12,6 @@ module.exports = { name: "permissions", description: "Manage player's in-city permissions", - default_permission: false, role: "god", options: [ diff --git a/server/commands/qb-revive.js b/server/commands/qb-revive.js index f98d62a..25a47bc 100644 --- a/server/commands/qb-revive.js +++ b/server/commands/qb-revive.js @@ -12,7 +12,6 @@ module.exports = { name: "revive", description: "Raise a downed player to full health and stats", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-reviveall.js b/server/commands/qb-reviveall.js index 010a883..89cc0b0 100644 --- a/server/commands/qb-reviveall.js +++ b/server/commands/qb-reviveall.js @@ -12,7 +12,6 @@ module.exports = { name: "revive-all", description: "Raise all downed players to full health and stats", - default_permission: false, role: "god", run: async (client, interaction, args) => { diff --git a/server/commands/qb-time.js b/server/commands/qb-time.js index c93d45c..41b926b 100644 --- a/server/commands/qb-time.js +++ b/server/commands/qb-time.js @@ -12,7 +12,6 @@ module.exports = { name: "time", description: "set city time", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/qb-user-checkonline.js b/server/commands/qb-user-checkonline.js index 5d99f7e..f318828 100644 --- a/server/commands/qb-user-checkonline.js +++ b/server/commands/qb-user-checkonline.js @@ -12,7 +12,6 @@ module.exports = { name: "onlinecheck", type: "USER", - default_permission: false, role: "mod", run: async (client, interaction, args) => { diff --git a/server/commands/qb-vehicle.js b/server/commands/qb-vehicle.js index b052882..a646a80 100644 --- a/server/commands/qb-vehicle.js +++ b/server/commands/qb-vehicle.js @@ -20,7 +20,6 @@ const vehicleStates = { module.exports = { name: "vehicle", description: "Give user a vehicle with a fixed plate", - default_permission: false, role: "god", options: [ diff --git a/server/commands/qb-weather.js b/server/commands/qb-weather.js index 2bccf26..047b5d9 100644 --- a/server/commands/qb-weather.js +++ b/server/commands/qb-weather.js @@ -12,7 +12,6 @@ module.exports = { name: "weather", description: "Manage city weather", - default_permission: false, role: "admin", options: [ diff --git a/server/commands/resource.js b/server/commands/resource.js index 4da31e9..8c50d92 100644 --- a/server/commands/resource.js +++ b/server/commands/resource.js @@ -14,7 +14,6 @@ const { MessageButton } = require("discord.js"); module.exports = { name: "resource", description: "Manage server resources / scripts", - default_permission: false, role: "god", options: [ diff --git a/server/commands/screenshot.js b/server/commands/screenshot.js index 7596865..4e37ab5 100644 --- a/server/commands/screenshot.js +++ b/server/commands/screenshot.js @@ -15,7 +15,6 @@ const Buffer = require("buffer").Buffer; module.exports = { name: "screenshot", description: "Screenshot player's POV", - default_permission: false, role: "god", options: [ diff --git a/server/commands/server.js b/server/commands/server.js index 0ba6e0c..865809f 100644 --- a/server/commands/server.js +++ b/server/commands/server.js @@ -12,8 +12,6 @@ module.exports = { name: "server", description: "Get FiveM and Discord Stats", - // default_permission: false, - // role: "mod", run: async (client, interaction) => { if (client.isRolePresent(interaction.member, [client.config.DiscordModRoleId, client.config.DiscordAdminRoleId, client.config.DiscordGodRoleId])) { @@ -34,7 +32,7 @@ module.exports = { **Channels:** ${interaction.guild.channels.cache.filter((chan) => chan.type === "GUILD_TEXT").size} **Members:** ${interaction.guild.memberCount}${getWhitelisted(client, interaction)} **Owner:** <@${interaction.guild.ownerId}> (${interaction.guild.ownerId})`, true) - .setFooter({ text: `${GetCurrentResourceName()} by zfbx` }); + .setFooter({ text: "zdiscord by zfbx" }); return interaction.reply({ embeds: [ embed ] }); } else { const embed = new client.Embed() @@ -42,7 +40,7 @@ module.exports = { .addField(client.config.FiveMServerName, `**Server IP:** ${client.config.FiveMServerIP} **Uptime:** ${(GetGameTimer() / 1000 / 60).toFixed(2)} minutes **Players:** ${GetNumPlayerIndices()}/${GetConvar("sv_maxClients", "Unknown")}`, false) - .setFooter({ text: `${GetCurrentResourceName()} by zfbx` }); + .setFooter({ text: "zdiscord by zfbx" }); return interaction.reply({ embeds: [ embed ] }); } }, diff --git a/server/commands/teleport.js b/server/commands/teleport.js index d00d13f..9a53a4d 100644 --- a/server/commands/teleport.js +++ b/server/commands/teleport.js @@ -12,7 +12,6 @@ module.exports = { name: "teleport", description: "teleport a player", - default_permission: false, role: "mod", options: [ diff --git a/server/commands/teleportall.js b/server/commands/teleportall.js index 9613667..2dc225b 100644 --- a/server/commands/teleportall.js +++ b/server/commands/teleportall.js @@ -12,7 +12,6 @@ module.exports = { name: "teleport-all", description: "teleport everyone", - default_permission: false, role: "god", options: [ diff --git a/server/commands/whitelist.js b/server/commands/whitelist.js index 429eb8c..e93a688 100644 --- a/server/commands/whitelist.js +++ b/server/commands/whitelist.js @@ -12,7 +12,6 @@ module.exports = { name: "whitelist", description: "Manage whitelist", - default_permission: false, role: "god", options: [ diff --git a/server/events/interactionCreate.js b/server/events/interactionCreate.js index 6e4ce04..cf113e8 100644 --- a/server/events/interactionCreate.js +++ b/server/events/interactionCreate.js @@ -18,6 +18,10 @@ module.exports = { if (!command) { return interaction.reply({ content: "An error has occurred ", ephemeral: true }).catch((error) => client.utils.log.handler("error", error)); } + if (!client.hasPermission(interaction.member, command.role)) { + return interaction.reply({ content: "You don't have permission to use this command", ephemeral: true }).catch(); + } + const args = {}; for (const option of interaction.options.data) { if (option.type === "SUB_COMMAND") { diff --git a/server/events/ready.js b/server/events/ready.js index 1ba8543..87c9ed4 100644 --- a/server/events/ready.js +++ b/server/events/ready.js @@ -16,22 +16,11 @@ module.exports = { if (client.config.EnableDiscordSlashCommands) { const guild = client.guilds.cache.get(client.config.DiscordGuildId); if (!guild) return client.utils.log.error("DISCORD SERVER NOT FOUND - Is your config for 'DiscordGuildId' set correctly?"); - await guild.commands.set(client.arrayOfCommands).catch((error) => client.utils.log.handler("error", error)).then((cmd) => { - const fullPermissions = cmd.reduce((accumulator, x) => { - const command = client.arrayOfCommands.find((y) => y.name === x.name).role; - if (!command) return accumulator; - const permissions = client.config.perms[command]; - return [ - ...accumulator, - { id: x.id, permissions }, - ]; - }, []); - guild.commands.permissions.set({ fullPermissions }).catch((error) => client.utils.log.handler("error", error)); - }); + await guild.commands.set(client.arrayOfCommands).catch((error) => client.utils.log.handler("error", error)); } if (client.config.EnableBotStatusMessages && client.config.BotStatusMessages) statusUpdater(client); client.utils.log.info(`Logged in as ${client.user.tag}`); - client.utils.log.info(`Enjoying zdiscord? Consider supporting it at patreon.com/zfbx or paypal.me/zfbx <3`); + client.utils.log.info("Enjoying zdiscord? Consider supporting it at patreon.com/zfbx or paypal.me/zfbx <3"); emit("zdiscord:ready"); }, }; diff --git a/server/utils.js b/server/utils.js index 05a6ee8..9527e77 100644 --- a/server/utils.js +++ b/server/utils.js @@ -125,7 +125,7 @@ const log = { * @param {object} settings - Optional overrides of style and label */ write: (content, { color = "\x1b[37m", tag = "LOG", error = false } = {}) => { const stream = error ? process.stderr : process.stdout; - stream.write(`\x1b[1;36m[${GetCurrentResourceName()}]\x1b[0m[${log.timestamp()}]${color}[${tag}]: ${log.clean(content)}\x1b[0m\n`); + stream.write(`\x1b[1;36m[zdiscord]\x1b[0m[${log.timestamp()}]${color}[${tag}]: ${log.clean(content)}\x1b[0m\n`); return false; }, @@ -143,7 +143,7 @@ const log = { * @param {string|object} err - error to process */ handler: (type, err) => { const e = err.toString(); - if (e.includes("[DISALLOWED_INTENTS]")) log.error(`YOU DIDN'T ENABLE INTENTS - go back to the ${GetCurrentResourceName()} readme.md and read the section under "setup"`); + if (e.includes("[DISALLOWED_INTENTS]")) log.error("YOU DIDN'T ENABLE INTENTS - go back to the zdiscord readme.md and read the section under \"setup\""); else if (e.includes("[TOKEN_INVALID]")) log.error("YOUR DISCORD API TOKEN IS INVALID OR REVOKED - GENERATE A NEW ONE AND UPDATE THE CONFIG"); else if (e.includes("Missing Access")) log.error("NO COMMAND CREATION PERMISSIONS - You must reinvite the bot to your server with the invite link provided in setup"); else if (e.includes("[HeartbeatTimer]")) return; diff --git a/yarn.lock b/yarn.lock index d406662..b5e963f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,158 +3,159 @@ "@discordjs/builders@^0.11.0": - version "0.11.0" - resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-0.11.0.tgz#4102abe3e0cd093501f3f71931df43eb92f5b0cc" - integrity sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg== + "integrity" "sha512-ZTB8yJdJKrKlq44dpWkNUrAtEJEq0gqpb7ASdv4vmq6/mZal5kOv312hQ56I/vxwMre+VIkoHquNUAfnTbiYtg==" + "resolved" "https://registry.npmjs.org/@discordjs/builders/-/builders-0.11.0.tgz" + "version" "0.11.0" dependencies: "@sindresorhus/is" "^4.2.0" - discord-api-types "^0.26.0" - ts-mixer "^6.0.0" - tslib "^2.3.1" - zod "^3.11.6" + "discord-api-types" "^0.26.0" + "ts-mixer" "^6.0.0" + "tslib" "^2.3.1" + "zod" "^3.11.6" "@discordjs/collection@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-0.4.0.tgz#b6488286a1cc7b41b644d7e6086f25a1c1e6f837" - integrity sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw== + "integrity" "sha512-zmjq+l/rV35kE6zRrwe8BHqV78JvIh2ybJeZavBi5NySjWXqN3hmmAKg7kYMMXSeiWtSsMoZ/+MQi0DiQWy2lw==" + "resolved" "https://registry.npmjs.org/@discordjs/collection/-/collection-0.4.0.tgz" + "version" "0.4.0" "@sapphire/async-queue@^1.1.9": - version "1.1.9" - resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.1.9.tgz#ce69611c8753c4affd905a7ef43061c7eb95c01b" - integrity sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ== + "integrity" "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==" + "resolved" "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz" + "version" "1.1.9" "@sindresorhus/is@^4.2.0": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.2.1.tgz#b88b5724283db80b507cd612caee9a1947412a20" - integrity sha512-BrzrgtaqEre0qfvI8sMTaEvx+bayuhPmfe2rfeUGPPHYr/PLxCOqkOe4TQTDPb+qcqgNcsAtXV/Ew74mcDIE8w== + "integrity" "sha512-BrzrgtaqEre0qfvI8sMTaEvx+bayuhPmfe2rfeUGPPHYr/PLxCOqkOe4TQTDPb+qcqgNcsAtXV/Ew74mcDIE8w==" + "resolved" "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.1.tgz" + "version" "4.2.1" "@types/node-fetch@^2.5.12": - version "2.5.12" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" - integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== + "integrity" "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==" + "resolved" "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz" + "version" "2.5.12" dependencies: "@types/node" "*" - form-data "^3.0.0" + "form-data" "^3.0.0" "@types/node@*": - version "17.0.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.8.tgz#50d680c8a8a78fe30abe6906453b21ad8ab0ad7b" - integrity sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg== + "integrity" "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==" + "resolved" "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz" + "version" "17.0.8" "@types/ws@^8.2.2": - version "8.2.2" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.2.2.tgz#7c5be4decb19500ae6b3d563043cd407bf366c21" - integrity sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg== + "integrity" "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==" + "resolved" "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz" + "version" "8.2.2" dependencies: "@types/node" "*" -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +"asynckit@^0.4.0": + "integrity" "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "resolved" "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + "version" "0.4.0" -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== +"combined-stream@^1.0.8": + "integrity" "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==" + "resolved" "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" + "version" "1.0.8" dependencies: - delayed-stream "~1.0.0" + "delayed-stream" "~1.0.0" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +"delayed-stream@~1.0.0": + "integrity" "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + "version" "1.0.0" -discord-api-types@^0.26.0: - version "0.26.1" - resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.26.1.tgz#726f766ddc37d60da95740991d22cb6ef2ed787b" - integrity sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ== +"discord-api-types@^0.26.0": + "integrity" "sha512-T5PdMQ+Y1MEECYMV5wmyi9VEYPagEDEi4S0amgsszpWY0VB9JJ/hEvM6BgLhbdnKky4gfmZEXtEEtojN8ZKJQQ==" + "resolved" "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.26.1.tgz" + "version" "0.26.1" "discord.js@github:zfbx/discord.js": - version "13.6.0" - resolved "https://codeload.github.com/zfbx/discord.js/tar.gz/bb643b504bd1e4416389e81f4f0ff9ce3a111aa0" + "integrity" "sha512-ma8BQG8KBKSTvJH6IOr69kSqGRBbWR8JlAiAKAyHWzMORCR8IQUteiKH0JvQeJ64Uzcy3408YXy0mSEb0OWGVA==" + "resolved" "https://codeload.github.com/zfbx/discord.js/tar.gz/bb643b504bd1e4416389e81f4f0ff9ce3a111aa0" + "version" "13.6.0" dependencies: "@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.2" - discord-api-types "^0.26.0" - form-data "^4.0.0" - node-fetch "^2.6.1" - ws "^8.4.0" - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + "discord-api-types" "^0.26.0" + "form-data" "^4.0.0" + "node-fetch" "^2.6.1" + "ws" "^8.4.0" + +"form-data@^3.0.0": + "integrity" "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==" + "resolved" "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz" + "version" "3.0.1" dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + "asynckit" "^0.4.0" + "combined-stream" "^1.0.8" + "mime-types" "^2.1.12" + +"form-data@^4.0.0": + "integrity" "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==" + "resolved" "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" + "version" "4.0.0" dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== - -mime-types@^2.1.12: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + "asynckit" "^0.4.0" + "combined-stream" "^1.0.8" + "mime-types" "^2.1.12" + +"mime-db@1.51.0": + "integrity" "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==" + "resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz" + "version" "1.51.0" + +"mime-types@^2.1.12": + "integrity" "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==" + "resolved" "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz" + "version" "2.1.34" dependencies: - mime-db "1.51.0" + "mime-db" "1.51.0" -node-fetch@^2.6.1: - version "2.6.6" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89" - integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA== +"node-fetch@^2.6.1": + "integrity" "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==" + "resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz" + "version" "2.6.6" dependencies: - whatwg-url "^5.0.0" - -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= - -ts-mixer@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/ts-mixer/-/ts-mixer-6.0.0.tgz#4e631d3a36e3fa9521b973b132e8353bc7267f9f" - integrity sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ== - -tslib@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= - -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + "whatwg-url" "^5.0.0" + +"tr46@~0.0.3": + "integrity" "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "resolved" "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + "version" "0.0.3" + +"ts-mixer@^6.0.0": + "integrity" "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==" + "resolved" "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz" + "version" "6.0.0" + +"tslib@^2.3.1": + "integrity" "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "resolved" "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz" + "version" "2.3.1" + +"webidl-conversions@^3.0.0": + "integrity" "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "resolved" "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + "version" "3.0.1" + +"whatwg-url@^5.0.0": + "integrity" "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=" + "resolved" "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + "version" "5.0.0" dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -ws@^8.4.0: - version "8.4.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.4.2.tgz#18e749868d8439f2268368829042894b6907aa0b" - integrity sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA== - -zod@^3.11.6: - version "3.11.6" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.11.6.tgz#e43a5e0c213ae2e02aefe7cb2b1a6fa3d7f1f483" - integrity sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg== + "tr46" "~0.0.3" + "webidl-conversions" "^3.0.0" + +"ws@^8.4.0": + "integrity" "sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA==" + "resolved" "https://registry.npmjs.org/ws/-/ws-8.4.2.tgz" + "version" "8.4.2" + +"zod@^3.11.6": + "integrity" "sha512-daZ80A81I3/9lIydI44motWe6n59kRBfNzTuS2bfzVh1nAXi667TOTWWtatxyG+fwgNUiagSj/CWZwRRbevJIg==" + "resolved" "https://registry.npmjs.org/zod/-/zod-3.11.6.tgz" + "version" "3.11.6"