From b8061116b2737c1afd2f5dab6ec515162c44bf2d Mon Sep 17 00:00:00 2001 From: Snacken Bat Date: Sun, 25 Aug 2024 01:17:06 -0500 Subject: [PATCH] eslint and corrections Using js recommended and prettier to preform eslint. --- commands/channelcommands/bitrate.js | 62 +- commands/channelcommands/limit.js | 68 +- commands/channelcommands/lock.js | 107 +- commands/channelcommands/private.js | 111 +- commands/channelcommands/region.js | 47 +- commands/channelcommands/rename.js | 65 +- commands/channelcommands/waitingroom.js | 49 +- commands/moderation/ban.js | 83 +- commands/moderation/kick.js | 78 +- commands/moderation/owner.js | 71 +- commands/moderation/unban.js | 68 +- commands/moderatoronly/permvoice.js | 66 +- commands/moderatoronly/reload.js | 86 +- commands/moderatoronly/setup.js | 286 ++-- commands/utility/ping.js | 20 +- delete-commands.js | 54 +- deploy-commands.js | 92 +- eslint.config.cjs | 33 + events/interactionCreate.js | 113 +- events/ready.js | 14 +- index.js | 477 +++--- methods/channelowner.js | 4 +- methods/locks.js | 4 +- methods/private.js | 4 +- methods/waitingRoom.js | 4 +- package-lock.json | 1992 ++++++++++------------- package.json | 13 +- 27 files changed, 2053 insertions(+), 2018 deletions(-) create mode 100644 eslint.config.cjs diff --git a/commands/channelcommands/bitrate.js b/commands/channelcommands/bitrate.js index 8250aed..e916ad2 100644 --- a/commands/channelcommands/bitrate.js +++ b/commands/channelcommands/bitrate.js @@ -1,42 +1,52 @@ -const { Client, SlashCommandBuilder, PermissionFlagsBits , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'channelcommands', + category: "channelcommands", data: new SlashCommandBuilder() - .setName('bitrate') - .setDescription('The bitrate for the channel.') - .addIntegerOption(option => - option.setName('bitrate') - .setDescription('The bitrate for the channel.') - .setRequired(true) - .setMinValue(8) - .setMaxValue(96)), -async execute(interaction) { - const guild = interaction.guild + .setName("bitrate") + .setDescription("The bitrate for the channel.") + .addIntegerOption((option) => + option + .setName("bitrate") + .setDescription("The bitrate for the channel.") + .setRequired(true) + .setMinValue(8) + .setMaxValue(96), + ), + async execute(interaction) { const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const bitrate = interaction.options.getInteger('bitrate'); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Method to set the channel permanet status toggles - try { - await interaction.reply({ content:`This feature is a work in progress.`, ephemeral: true }); - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } - + try { + await interaction.reply({ + content: `This feature is a work in progress.`, + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } }, -}; \ No newline at end of file +}; diff --git a/commands/channelcommands/limit.js b/commands/channelcommands/limit.js index c5bc5fc..6e82b2d 100644 --- a/commands/channelcommands/limit.js +++ b/commands/channelcommands/limit.js @@ -1,47 +1,57 @@ -const { Client, SlashCommandBuilder, PermissionsBitField , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); -const { toggleLock } = require('../../methods/locks'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'limir', + category: "limir", data: new SlashCommandBuilder() - .setName('limit') - .setDescription('Change the user limit.') - .addIntegerOption(option => - option.setName('limit') - .setDescription('The user limit for the channel.') - .setRequired(true) - .setMinValue(1) - .setMaxValue(99)), + .setName("limit") + .setDescription("Change the user limit.") + .addIntegerOption((option) => + option + .setName("limit") + .setDescription("The user limit for the channel.") + .setRequired(true) + .setMinValue(1) + .setMaxValue(99), + ), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; const targetChannel = guild.channels.cache.get(currentChannel); - const limit = interaction.options.getInteger('limit'); + const limit = interaction.options.getInteger("limit"); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Public to private - try { - - // Remove the channel permissions for @everyone - targetChannel.setUserLimit(limi) - return interaction.reply({ content: `the limit was adjusted to ${limit}`, ephemeral: true }); - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } - + try { + // Remove the channel permissions for @everyone + targetChannel.setUserLimit(limit); + return interaction.reply({ + content: `the limit was adjusted to ${limit}`, + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } }, -}; \ No newline at end of file +}; diff --git a/commands/channelcommands/lock.js b/commands/channelcommands/lock.js index d7795bb..1eba180 100644 --- a/commands/channelcommands/lock.js +++ b/commands/channelcommands/lock.js @@ -1,73 +1,94 @@ -const { Client, SlashCommandBuilder, PermissionsBitField , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); -const { toggleLock } = require('../../methods/locks'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); +const { toggleLock } = require("../../methods/locks"); module.exports = { - category: 'channelcommands', + category: "channelcommands", data: new SlashCommandBuilder() - .setName('lock') - .setDescription('Toggle the channel between being locked/unlocked.'), + .setName("lock") + .setDescription("Toggle the channel between being locked/unlocked."), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; const targetChannel = guild.channels.cache.get(currentChannel); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Public to private if (toggleLock.get(currentChannel) === 0) { - try { + try { + // Set the channel permissions for @everyone + targetChannel.permissionOverwrites.edit(guild.roles.everyone, { + Connect: false, + }); - // Set the channel permissions for @everyone - targetChannel.permissionOverwrites.edit(guild.roles.everyone, { Connect: false }); + // Add the User to the channel + targetChannel.permissionOverwrites.edit(member, { Connect: true }); - // Add the User to the channel - targetChannel.permissionOverwrites.edit(member, { Connect: true }); + // Add the Bot to the channel + targetChannel.permissionOverwrites.edit(interaction.client.user, { + Connect: true, + ViewChannel: true, + }); - // Add the Bot to the channel - targetChannel.permissionOverwrites.edit(interaction.client.user, { Connect: true, ViewChannel: true }); - - toggleLock.set(currentChannel, 1); - return interaction.reply({ content: 'The channel was locked', ephemeral: true }); - - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } + toggleLock.set(currentChannel, 1); + return interaction.reply({ + content: "The channel was locked", + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } } //Private to public if (toggleLock.get(currentChannel) === 1) { - try { + try { + // Remove the channel permissions for @everyone + targetChannel.permissionOverwrites.delete(guild.roles.everyone); - // Remove the channel permissions for @everyone - targetChannel.permissionOverwrites.delete(guild.roles.everyone); + // Add the User to the channel + targetChannel.permissionOverwrites.edit(member, { ViewChannel: true }); - // Add the User to the channel - targetChannel.permissionOverwrites.edit(member, { ViewChannel: true }); + // Add the Bot to the channel + targetChannel.permissionOverwrites.edit(interaction.client.user, { + Connect: true, + ViewChannel: true, + Speak: true, + }); - // Add the Bot to the channel - targetChannel.permissionOverwrites.edit(interaction.client.user, { Connect: true, ViewChannel: true, Speak: true }); - - toggleLock.set(currentChannel, 0); - return interaction.reply({ content: 'The channel was unlocked', ephemeral: true }); - - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } + toggleLock.set(currentChannel, 0); + return interaction.reply({ + content: "The channel was unlocked", + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } } }, -}; \ No newline at end of file +}; diff --git a/commands/channelcommands/private.js b/commands/channelcommands/private.js index 0d346c4..32f576f 100644 --- a/commands/channelcommands/private.js +++ b/commands/channelcommands/private.js @@ -1,73 +1,98 @@ -const { Client, SlashCommandBuilder, PermissionsBitField , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); -const { togglePrivate } = require('../../methods/private'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); +const { togglePrivate } = require("../../methods/private"); module.exports = { - category: 'channelcommands', + category: "channelcommands", data: new SlashCommandBuilder() - .setName('private') - .setDescription('Toggle the channel to private (hide) or public.'), + .setName("private") + .setDescription("Toggle the channel to private (hide) or public."), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; const targetChannel = guild.channels.cache.get(currentChannel); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Public to private if (togglePrivate.get(currentChannel) === 0) { - try { + try { + // Set the channel permissions for @everyone + targetChannel.permissionOverwrites.edit(guild.roles.everyone, { + Connect: false, + ViewChannel: false, + }); - // Set the channel permissions for @everyone - targetChannel.permissionOverwrites.edit(guild.roles.everyone, { Connect: false, ViewChannel: false }); + // Add the User to the channel + targetChannel.permissionOverwrites.edit(member, { + Connect: true, + ViewChannel: true, + }); - // Add the User to the channel - targetChannel.permissionOverwrites.edit(member, { Connect: true, ViewChannel: true }); + // Add the Bot to the channel + targetChannel.permissionOverwrites.edit(interaction.client.user, { + Connect: true, + ViewChannel: true, + }); - // Add the Bot to the channel - targetChannel.permissionOverwrites.edit(interaction.client.user, { Connect: true, ViewChannel: true }); - - togglePrivate.set(currentChannel, 1); - return interaction.reply({ content: 'The channel was made private', ephemeral: true }); - - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } + togglePrivate.set(currentChannel, 1); + return interaction.reply({ + content: "The channel was made private", + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } } //Private to public if (togglePrivate.get(currentChannel) === 1) { - try { + try { + // Remove the channel permissions for @everyone + targetChannel.permissionOverwrites.delete(guild.roles.everyone); - // Remove the channel permissions for @everyone - targetChannel.permissionOverwrites.delete(guild.roles.everyone); + // Add the User to the channel + targetChannel.permissionOverwrites.edit(member, { ViewChannel: true }); - // Add the User to the channel - targetChannel.permissionOverwrites.edit(member, { ViewChannel: true }); + // Add the Bot to the channel + targetChannel.permissionOverwrites.edit(interaction.client.user, { + Connect: true, + ViewChannel: true, + Speak: true, + }); - // Add the Bot to the channel - targetChannel.permissionOverwrites.edit(interaction.client.user, { Connect: true, ViewChannel: true, Speak: true }); - - togglePrivate.set(currentChannel, 0); - return interaction.reply({ content: 'The channel was made public', ephemeral: true }); - - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } + togglePrivate.set(currentChannel, 0); + return interaction.reply({ + content: "The channel was made public", + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } } }, -}; \ No newline at end of file +}; diff --git a/commands/channelcommands/region.js b/commands/channelcommands/region.js index 65efca3..bccfd48 100644 --- a/commands/channelcommands/region.js +++ b/commands/channelcommands/region.js @@ -1,35 +1,44 @@ -const { Client, SlashCommandBuilder, PermissionFlagsBits , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'channelcommands', + category: "channelcommands", data: new SlashCommandBuilder() - .setName('region') - .setDescription('The region for the channel.'), -async execute(interaction) { - const guild = interaction.guild + .setName("region") + .setDescription("The region for the channel."), + async execute(interaction) { const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Method to set the channel permanet status toggles - try { - await interaction.reply({ content:`This feature is a work in progress.`, ephemeral: true }); - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } - + try { + await interaction.reply({ + content: `This feature is a work in progress.`, + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } }, -}; \ No newline at end of file +}; diff --git a/commands/channelcommands/rename.js b/commands/channelcommands/rename.js index 4883f2d..6949fb9 100644 --- a/commands/channelcommands/rename.js +++ b/commands/channelcommands/rename.js @@ -1,45 +1,58 @@ -const { Client, SlashCommandBuilder, PermissionsBitField , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'channelcommands', + category: "channelcommands", data: new SlashCommandBuilder() - .setName('rename') - .setDescription('Rename the channel.') - .addStringOption(option => - option.setName('input') - .setDescription('The input to echo back') - // Ensure the text will fit in an embed description, if the user chooses that option - .setMaxLength(100) - .setMinLength(1) - .setRequired(true)), + .setName("rename") + .setDescription("Rename the channel.") + .addStringOption((option) => + option + .setName("input") + .setDescription("The input to echo back") + // Ensure the text will fit in an embed description, if the user chooses that option + .setMaxLength(100) + .setMinLength(1) + .setRequired(true), + ), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; const targetChannel = guild.channels.cache.get(currentChannel); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Rename the channel - try { - // Set the channel name - targetChannel.setName(interaction.options.getString('input')); + try { + // Set the channel name + targetChannel.setName(interaction.options.getString("input")); - return interaction.reply({ content: `The channel was renamed to ${interaction.options.getString('input')}`, ephemeral: true }); - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } + return interaction.reply({ + content: `The channel was renamed to ${interaction.options.getString("input")}`, + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } }, -}; \ No newline at end of file +}; diff --git a/commands/channelcommands/waitingroom.js b/commands/channelcommands/waitingroom.js index 39f232c..67515db 100644 --- a/commands/channelcommands/waitingroom.js +++ b/commands/channelcommands/waitingroom.js @@ -1,37 +1,44 @@ -const { Client, SlashCommandBuilder, PermissionFlagsBits , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); -const { waitingRoom } = require('../../methods/waitingRoom'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'channelcommands', + category: "channelcommands", data: new SlashCommandBuilder() - .setName('waitingroom') - .setDescription('Toggle a waitng Room for the channel.'), -async execute(interaction) { - const guild = interaction.guild + .setName("waitingroom") + .setDescription("Toggle a waitng Room for the channel."), + async execute(interaction) { const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const targetVoice = interaction.options.getChannel('channel'); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Method to set the channel permanet status toggles - try { - await interaction.reply({ content:`This feature is a work in progress.`, ephemeral: true }); - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } - + try { + await interaction.reply({ + content: `This feature is a work in progress.`, + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } }, -}; \ No newline at end of file +}; diff --git a/commands/moderation/ban.js b/commands/moderation/ban.js index 26b5cf1..264e713 100644 --- a/commands/moderation/ban.js +++ b/commands/moderation/ban.js @@ -1,62 +1,85 @@ -const { Client, SlashCommandBuilder, PermissionsBitField , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'moderation', + category: "moderation", data: new SlashCommandBuilder() - .setName('ban') - .setDescription('Bans a user from the voice channel') - .addUserOption(option => + .setName("ban") + .setDescription("Bans a user from the voice channel") + .addUserOption((option) => option - .setName('target') - .setDescription('The user to ban.') - .setRequired(true)), + .setName("target") + .setDescription("The user to ban.") + .setRequired(true), + ), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const target = interaction.options.getUser('target').id; + const target = interaction.options.getUser("target").id; const targetnew = guild.members.cache.get(target); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Prevent the user from kicking themselves if (member.id === target) { - return interaction.reply({ content: 'You cannot kick yourself.', ephemeral: true }); + return interaction.reply({ + content: "You cannot kick yourself.", + ephemeral: true, + }); } //Prevent the use r from kicking this bot from the channel if (target === interaction.client.user.id) { - return interaction.reply({ content: 'You cannot ban me from the channel.', ephemeral: true }); + return interaction.reply({ + content: "You cannot ban me from the channel.", + ephemeral: true, + }); } try { - //Set the target users PermissionsBitField for the channel - const targetChannel = guild.channels.cache.get(currentChannel); - // edits overwrites to allow a user to not connect to the channel - targetChannel.permissionOverwrites.edit(target, { Connect: false }); + //Set the target users PermissionsBitField for the channel + const targetChannel = guild.channels.cache.get(currentChannel); + // edits overwrites to allow a user to not connect to the channel + targetChannel.permissionOverwrites.edit(target, { Connect: false }); - //Check if the target user is in the same voice channel - if (targetnew.voice.channel && targetnew.voice.channel.id === member.voice.channel.id) { - targetnew.voice.disconnect(); - await interaction.reply({ content: `<@${target}> has been kicked from the channel.`, ephemeral: true }); - } - - await interaction.reply({ content: `<@${target}> has been banned from the channel.`, ephemeral: true }); - + //Check if the target user is in the same voice channel + if ( + targetnew.voice.channel && + targetnew.voice.channel.id === member.voice.channel.id + ) { + targetnew.voice.disconnect(); + await interaction.reply({ + content: `<@${target}> has been kicked from the channel.`, + ephemeral: true, + }); + } + await interaction.reply({ + content: `<@${target}> has been banned from the channel.`, + ephemeral: true, + }); } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); console.log(error); } }, -}; \ No newline at end of file +}; diff --git a/commands/moderation/kick.js b/commands/moderation/kick.js index f53ee32..8d25cbc 100644 --- a/commands/moderation/kick.js +++ b/commands/moderation/kick.js @@ -1,52 +1,72 @@ -const { SlashCommandBuilder, PermissionFlagsBits, ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'moderation', + category: "moderation", data: new SlashCommandBuilder() - .setName('kick') - .setDescription('Kicks a user from the voice channel') - .addUserOption(option => + .setName("kick") + .setDescription("Kicks a user from the voice channel") + .addUserOption((option) => option - .setName('target') - .setDescription('The user to kick.') - .setRequired(true)), + .setName("target") + .setDescription("The user to kick.") + .setRequired(true), + ), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const target = interaction.options.getUser('target').id; + const target = interaction.options.getUser("target").id; const targetnew = guild.members.cache.get(target); //Check if the user is in the voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } - //Prevent the user from kicking themselves - if (member.id === target) { - return interaction.reply({ content: 'You cannot kick yourself.', ephemeral: true }); -} + //Prevent the user from kicking themselves + if (member.id === target) { + return interaction.reply({ + content: "You cannot kick yourself.", + ephemeral: true, + }); + } try { - //Check if the target user is in the same voice channel - if (!targetnew.voice.channel || targetnew.voice.channel.id !== member.voice.channel.id) { - return interaction.reply({ content: `<@${target}> is not in the voice channel.`, ephemeral: true }); - } - else { - targetnew.voice.disconnect(); - await interaction.reply({ content: `<@${target}> has been kicked from the channel.`, ephemeral: true }); - } - + //Check if the target user is in the same voice channel + if ( + !targetnew.voice.channel || + targetnew.voice.channel.id !== member.voice.channel.id + ) { + return interaction.reply({ + content: `<@${target}> is not in the voice channel.`, + ephemeral: true, + }); + } else { + targetnew.voice.disconnect(); + await interaction.reply({ + content: `<@${target}> has been kicked from the channel.`, + ephemeral: true, + }); + } } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); console.log(error); } }, -}; \ No newline at end of file +}; diff --git a/commands/moderation/owner.js b/commands/moderation/owner.js index a80c659..a9ad021 100644 --- a/commands/moderation/owner.js +++ b/commands/moderation/owner.js @@ -1,54 +1,75 @@ -const { SlashCommandBuilder, PermissionFlagsBits, ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const fs = require('node:fs'); -const wait = require('node:timers/promises').setTimeout; -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'moderation', + category: "moderation", data: new SlashCommandBuilder() - .setName('transferownership') - .setDescription('Transfer the ownership of the temp channel to a new owner.') - .addUserOption(option => + .setName("transferownership") + .setDescription( + "Transfer the ownership of the temp channel to a new owner.", + ) + .addUserOption((option) => option - .setName('target') - .setDescription('The user to transfer the ownership to.') - .setRequired(true)), + .setName("target") + .setDescription("The user to transfer the ownership to.") + .setRequired(true), + ), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const target = interaction.options.getUser('target').id; + const target = interaction.options.getUser("target").id; const targetnew = guild.members.cache.get(target); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } - + //Check if the user is trying to transfer ownership to themselves if (interaction.user.id === target) { - return interaction.reply({ content: 'You cannot transfer ownership to yourself.', ephemeral: true }); + return interaction.reply({ + content: "You cannot transfer ownership to yourself.", + ephemeral: true, + }); } // Transfer the ownership of the channel to the target user try { - if (!targetnew.voice.channel || targetnew.voice.channel.id !== member.voice.channel.id) { - return interaction.reply({ content: `<@${target}> is not in the voice channel.`, ephemeral: true }); - } - else { + if ( + !targetnew.voice.channel || + targetnew.voice.channel.id !== member.voice.channel.id + ) { + return interaction.reply({ + content: `<@${target}> is not in the voice channel.`, + ephemeral: true, + }); + } else { channelOwners.set(currentChannel, target); - await interaction.reply({ content:`Channel ownership has been transferred to <@${target}>.`, ephemeral: true }); + await interaction.reply({ + content: `Channel ownership has been transferred to <@${target}>.`, + ephemeral: true, + }); } } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); console.log(error); } }, -}; \ No newline at end of file +}; diff --git a/commands/moderation/unban.js b/commands/moderation/unban.js index 4e3f9b0..b7d351e 100644 --- a/commands/moderation/unban.js +++ b/commands/moderation/unban.js @@ -1,56 +1,72 @@ -const { Client, SlashCommandBuilder, PermissionsBitField , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); +const { SlashCommandBuilder } = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'moderation', + category: "moderation", data: new SlashCommandBuilder() - .setName('unban') - .setDescription('Unbans a user from the voice channel') - .addUserOption(option => + .setName("unban") + .setDescription("Unbans a user from the voice channel") + .addUserOption((option) => option - .setName('target') - .setDescription('The user to unban.') - .setRequired(true)), + .setName("target") + .setDescription("The user to unban.") + .setRequired(true), + ), async execute(interaction) { - const guild = interaction.guild + const guild = interaction.guild; const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const target = interaction.options.getUser('target').id; - const targetnew = guild.members.cache.get(target); + const target = interaction.options.getUser("target").id; //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Prevent the user from kicking themselves if (member.id === target) { - return interaction.reply({ content: 'You cannot kick yourself.', ephemeral: true }); + return interaction.reply({ + content: "You cannot kick yourself.", + ephemeral: true, + }); } //Prevent the use r from kicking this bot from the channel if (target === interaction.client.user.id) { - return interaction.reply({ content: 'You cannot ban me from the channel.', ephemeral: true }); + return interaction.reply({ + content: "You cannot ban me from the channel.", + ephemeral: true, + }); } try { - //Set the target users PermissionsBitField for the channel - const targetChannel = guild.channels.cache.get(currentChannel); - // delete overwrites to allow a user to connect to the channel - targetChannel.permissionOverwrites.delete(target); - - await interaction.reply({ content: `<@${target}> has been unbanned from the channel.`, ephemeral: true }); - + //Set the target users PermissionsBitField for the channel + const targetChannel = guild.channels.cache.get(currentChannel); + // delete overwrites to allow a user to connect to the channel + targetChannel.permissionOverwrites.delete(target); + await interaction.reply({ + content: `<@${target}> has been unbanned from the channel.`, + ephemeral: true, + }); } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); console.log(error); } }, -}; \ No newline at end of file +}; diff --git a/commands/moderatoronly/permvoice.js b/commands/moderatoronly/permvoice.js index bb04e48..849d1a1 100644 --- a/commands/moderatoronly/permvoice.js +++ b/commands/moderatoronly/permvoice.js @@ -1,44 +1,56 @@ -const { Client, SlashCommandBuilder, PermissionFlagsBits , ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const { channelOwners } = require('../../methods/channelowner'); -const { toggleLock } = require('../../methods/locks'); +const { + SlashCommandBuilder, + PermissionFlagsBits, + ChannelType, +} = require("discord.js"); +require("dotenv").config(); +const { channelOwners } = require("../../methods/channelowner"); module.exports = { - category: 'permanentvoice', + category: "permanentvoice", data: new SlashCommandBuilder() - .setName('permvoice') - .setDescription('Change the user limit.') - .addChannelOption(option => - option - .setName('channel') - .setDescription('The create voice channel id to use.') - .addChannelTypes(ChannelType.GuildVoice) - .setRequired(false)) - .setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels), + .setName("permvoice") + .setDescription("Change the user limit.") + .addChannelOption((option) => + option + .setName("channel") + .setDescription("The create voice channel id to use.") + .addChannelTypes(ChannelType.GuildVoice) + .setRequired(false), + ) + .setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels), async execute(interaction) { - const guild = interaction.guild const member = await interaction.guild.members.fetch(interaction.user.id); const currentChannel = member.voice.channel.id; - const targetVoice = interaction.options.getChannel('channel'); //Check if the user is in a voice channel if (!channelOwners.has(currentChannel)) { - return interaction.reply({ content: 'You must be in a temporary channel.', ephemeral: true }); + return interaction.reply({ + content: "You must be in a temporary channel.", + ephemeral: true, + }); } //Check if the user is the owner of the channel if (channelOwners.get(currentChannel) !== member.id) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); } //Method to set the channel permanet status toggles - try { - await interaction.reply({ content:`This feature is a work in progress.`, ephemeral: true }); - - } catch (error) { - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); - console.log(error); - } - + try { + await interaction.reply({ + content: `This feature is a work in progress.`, + ephemeral: true, + }); + } catch (error) { + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); + console.log(error); + } }, -}; \ No newline at end of file +}; diff --git a/commands/moderatoronly/reload.js b/commands/moderatoronly/reload.js index 0727dae..71a9a73 100644 --- a/commands/moderatoronly/reload.js +++ b/commands/moderatoronly/reload.js @@ -1,40 +1,60 @@ -const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js'); -require('dotenv').config(); +const { SlashCommandBuilder, PermissionFlagsBits } = require("discord.js"); +require("dotenv").config(); const ownerId = process.env.OWNERID; module.exports = { - category: 'utility', - notglobal: [], - data: new SlashCommandBuilder() - .setName('reload') - .setDescription('Reloads a command.') - .addStringOption(option => - option.setName('command') - .setDescription('The command to reload.') - .setRequired(true)) - .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), - async execute(interaction) { - const commandName = interaction.options.getString('command', true).toLowerCase(); - const command = interaction.client.commands.get(commandName); + category: "utility", + notglobal: [], + data: new SlashCommandBuilder() + .setName("reload") + .setDescription("Reloads a command.") + .addStringOption((option) => + option + .setName("command") + .setDescription("The command to reload.") + .setRequired(true), + ) + .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), + async execute(interaction) { + const commandName = interaction.options + .getString("command", true) + .toLowerCase(); + const command = interaction.client.commands.get(commandName); - if (interaction.user.id !== ownerId) { - return interaction.reply({ content: 'You do not have permission to use this command.', ephemeral: true }); - } + if (interaction.user.id !== ownerId) { + return interaction.reply({ + content: "You do not have permission to use this command.", + ephemeral: true, + }); + } - if (!command) { - return interaction.reply({ content: `There is no command with name \`${commandName}\`!`, ephemeral: true }); - } + if (!command) { + return interaction.reply({ + content: `There is no command with name \`${commandName}\`!`, + ephemeral: true, + }); + } - delete require.cache[require.resolve(`../${command.category}/${command.data.name}.js`)]; + delete require.cache[ + require.resolve(`../${command.category}/${command.data.name}.js`) + ]; - try { - interaction.client.commands.delete(command.data.name); - const newCommand = require(`../${command.category}/${command.data.name}.js`); - interaction.client.commands.set(newCommand.data.name, newCommand); - await interaction.reply({ content: `Command \`${newCommand.data.name}\` was reloaded!`, ephemeral: true }); - } catch (error) { - console.error(error); - await interaction.reply({ content:`There was an error while reloading a command \`${command.data.name}\`:\n\`${error.message}\``, ephemeral: true }); - } - }, -}; \ No newline at end of file + try { + interaction.client.commands.delete(command.data.name); + const newCommand = require( + `../${command.category}/${command.data.name}.js`, + ); + interaction.client.commands.set(newCommand.data.name, newCommand); + await interaction.reply({ + content: `Command \`${newCommand.data.name}\` was reloaded!`, + ephemeral: true, + }); + } catch (error) { + console.error(error); + await interaction.reply({ + content: `There was an error while reloading a command \`${command.data.name}\`:\n\`${error.message}\``, + ephemeral: true, + }); + } + }, +}; diff --git a/commands/moderatoronly/setup.js b/commands/moderatoronly/setup.js index 9a347fe..de372cf 100644 --- a/commands/moderatoronly/setup.js +++ b/commands/moderatoronly/setup.js @@ -1,110 +1,115 @@ -const { SlashCommandBuilder, PermissionFlagsBits, ChannelType, GuildChannel } = require('discord.js'); -require('dotenv').config(); -const fs = require('node:fs'); - -const FIELD_CATERGORYID_NAME = "CATEGORYID" -const FIELD_VOICECREATECHANNELID_NAME = "VOICECREATECHANNELID" +const { + SlashCommandBuilder, + PermissionFlagsBits, + ChannelType, + GuildChannel, +} = require("discord.js"); +require("dotenv").config(); +const fs = require("node:fs"); + +const FIELD_CATERGORYID_NAME = "CATEGORYID"; +const FIELD_VOICECREATECHANNELID_NAME = "VOICECREATECHANNELID"; /* function getValueFromField(fieldName, line) - * + * * description: Gets the value assigned to a field. Assumes one line in the format: = "" - * + * * parameters: string fieldName: name of the field to get * string line: line to get the field from - * + * * Returns: Null if the field cannot be found or the file otherwise does not match. if a match is found */ -function getValueFromField(fieldName, line) -{ - re = RegExp('^' + fieldName + '\\s*=\\s*\"(.*)\"') - matches = re.exec(line) - - if(matches == null) - { - return null // Group 1 - } - else - { - return matches[1] // Group 1 - } +function getValueFromField(fieldName, line) { + const re = RegExp("^" + fieldName + '\\s*=\\s*"(.*)"'); + const matches = re.exec(line); + + if (matches == null) { + return null; // Group 1 + } else { + return matches[1]; // Group 1 + } } /* function readSettingsFile() - * + * * description: Reads settings.cfg into a structure of the form {category, voiceChannelId} - * + * * parameters: None - * + * * Returns: A structure with the parameters category and voiceChannelId */ -function readSettingsFile(guildId) -{ - fileContents = fs.readFileSync(`./globalserversettings/setupsettings/${guildId}/settings.cfg`, 'utf8') - const lines = fileContents.split('\n') - settingsFile = {} - for (const line of lines) - { - if(line.startsWith(FIELD_CATERGORYID_NAME)) - { - settingsFile.category = getValueFromField(FIELD_CATERGORYID_NAME, line) - - if(settingsFile.category === null) - log.error(`Could not find the field ${FIELD_CATERGORYID_NAME}`) - } - else if(line.startsWith(FIELD_VOICECREATECHANNELID_NAME)) - { - settingsFile.voiceChannelId = getValueFromField(FIELD_VOICECREATECHANNELID_NAME, line) - if(settingsFile.voiceChannelId === null) - log.error(`Could not find the field ${FIELD_VOICECREATECHANNELID_NAME}`) - } +function readSettingsFile(guildId) { // eslint-disable-line + const fileContents = fs.readFileSync( + `./globalserversettings/setupsettings/${guildId}/settings.cfg`, + "utf8", + ); + const lines = fileContents.split("\n"); + const settingsFile = {}; + for (const line of lines) { + if (line.startsWith(FIELD_CATERGORYID_NAME)) { + settingsFile.category = getValueFromField(FIELD_CATERGORYID_NAME, line); + + if (settingsFile.category === null) + console.error(`Could not find the field ${FIELD_CATERGORYID_NAME}`); + } else if (line.startsWith(FIELD_VOICECREATECHANNELID_NAME)) { + settingsFile.voiceChannelId = getValueFromField( + FIELD_VOICECREATECHANNELID_NAME, + line, + ); + if (settingsFile.voiceChannelId === null) + console.error( + `Could not find the field ${FIELD_VOICECREATECHANNELID_NAME}`, + ); } - - return settingsFile + } + + return settingsFile; } /* function writeValueToField(fieldName, value) - * + * * description: Writes a field name and value pair into the form: = "" - * + * * parameters: string fieldName: name of the field to write * string value: Value to set - * + * * Returns: = "" if the value is null or undefined, otherwise returns = "" */ -function writeValueToField(fieldName, value) -{ - fileData = `${fieldName} = ` - if(typeof value === 'undefined' || value === null) - { - fileData = fileData + '""\n' - } - else - { - fileData = fileData + `\"${value}\"\n` - } - - return fileData +function writeValueToField(fieldName, value) { + let fileData = `${fieldName} = `; + if (typeof value === "undefined" || value === null) { + fileData = fileData + '""\n'; + } else { + fileData = fileData + `"${value}"\n`; + } + + return fileData; } /* function writeSettingsFile(settingsFile) - * + * * description: Writes settings.cfg into a structure of the form {category, voiceChannelId} - * + * * parameters: structure settingsFile: the structure to write to disk - * + * * Returns: void */ -function writeSettingsFile(settings, guildID) -{ - fileData = "" - - fileData = fileData + writeValueToField(FIELD_CATERGORYID_NAME, settings.category) - fileData = fileData + writeValueToField(FIELD_VOICECREATECHANNELID_NAME, settings.voiceChannelId) - - fs.writeFileSync(`./globalserversettings/setupsettings/${guildID}/settings.cfg`, fileData, 'utf8') +function writeSettingsFile(settings, guildID) { + let fileData = ""; + + fileData = + fileData + writeValueToField(FIELD_CATERGORYID_NAME, settings.category); + fileData = + fileData + + writeValueToField(FIELD_VOICECREATECHANNELID_NAME, settings.voiceChannelId); + + fs.writeFileSync( + `./globalserversettings/setupsettings/${guildID}/settings.cfg`, + fileData, + "utf8", + ); } - function createSettingsFile(guildId) { const directoryPath = `./globalserversettings/setupsettings/${guildId}`; const filePath = `${directoryPath}/settings.cfg`; @@ -112,97 +117,112 @@ function createSettingsFile(guildId) { try { fs.mkdirSync(directoryPath, { recursive: true }); - fs.writeFileSync(filePath, fileContents, 'utf8'); - console.log('Settings file created successfully'); + fs.writeFileSync(filePath, fileContents, "utf8"); + console.log("Settings file created successfully"); } catch (error) { - console.error('Error creating settings file:', error); + console.error("Error creating settings file:", error); } } module.exports = { - category: 'utility', + category: "utility", data: new SlashCommandBuilder() - .setName('setup') - .setDescription('Setup the temp channel.') - .addChannelOption(option => + .setName("setup") + .setDescription("Setup the temp channel.") + .addChannelOption((option) => option - .setName('category') - .setDescription('The category id to use') + .setName("category") + .setDescription("The category id to use") .addChannelTypes(ChannelType.GuildCategory) - .setRequired(false)) - .addChannelOption(option => + .setRequired(false), + ) + .addChannelOption((option) => option - .setName('channel') - .setDescription('The create voice channel id to use.') + .setName("channel") + .setDescription("The create voice channel id to use.") .addChannelTypes(ChannelType.GuildVoice) - .setRequired(false)) + .setRequired(false), + ) .setDefaultMemberPermissions(PermissionFlagsBits.ManageChannels), async execute(interaction) { - let settings = {} + let settings = {}; try { - varTargetedCategory = interaction.options.getChannel('category').id; - settings.category = varTargetedCategory; - } catch (error) { - varTargetedCategory = ""; + settings.category = interaction.options.getChannel("category").id; + } catch { + settings.category = ""; } try { - varTargetedVoiceCreate = interaction.options.getChannel('channel').id; - settings.voiceChannelId = varTargetedVoiceCreate; - } catch (error) { - varTargetedVoiceCreate = ""; + settings.voiceChannelId = interaction.options.getChannel("channel").id; + } catch { + settings.voiceChannelId = ""; } - const guild = interaction.guild + const guild = interaction.guild; let thecategoryId; let thevoiceChannelId; - if (!fs.existsSync(`./globalserversettings/setupsettings/${guild.id}/settings.cfg`)) { + if ( + !fs.existsSync( + `./globalserversettings/setupsettings/${guild.id}/settings.cfg`, + ) + ) { console.log("Settings file does not exist. Creating settings file."); createSettingsFile(guild.id); } try { - //Category - - if(!settings.category) - { - let category = await guild.channels.create({name: 'Temporary Voice Create', type: ChannelType.GuildCategory}); - thecategoryId = category.id; - console.log("Category created with ID:", thecategoryId); - settings.category = thecategoryId - } - - if(!settings.voiceChannelId) - { - let voice = await guild.channels.create({ name: 'Temporary Voice Create', type: ChannelType.GuildVoice }) - thevoiceChannelId = voice.id; - (console.log("Voice created with ID:", thevoiceChannelId)) - settings.voiceChannelId = thevoiceChannelId - } - - writeSettingsFile(settings, guild.id) + //Category + + if (!settings.category) { + let category = await guild.channels.create({ + name: "Temporary Voice Create", + type: ChannelType.GuildCategory, + }); + thecategoryId = category.id; + console.log("Category created with ID:", thecategoryId); + settings.category = thecategoryId; + } + + if (!settings.voiceChannelId) { + let voice = await guild.channels.create({ + name: "Temporary Voice Create", + type: ChannelType.GuildVoice, + }); + thevoiceChannelId = voice.id; + console.log("Voice created with ID:", thevoiceChannelId); + settings.voiceChannelId = thevoiceChannelId; + } + + writeSettingsFile(settings, guild.id); try { - const voice = await guild.channels.fetch(settings.voiceChannelId); - const catvoice = await guild.channels.fetch(settings.category); - - if (!(voice instanceof GuildChannel) || !(catvoice instanceof GuildChannel)) { - throw new Error('Voice channel or category not found'); - } + const voice = await guild.channels.fetch(settings.voiceChannelId); + const catvoice = await guild.channels.fetch(settings.category); + + if ( + !(voice instanceof GuildChannel) || + !(catvoice instanceof GuildChannel) + ) { + throw new Error("Voice channel or category not found"); + } await voice.setParent(catvoice, { lockPermissions: false }); - console.log('Voice channel moved to category'); - await interaction.reply({ content:`Voice Channels moved to category.`, ephemeral: true }); - - } catch (error) { + console.log("Voice channel moved to category"); + await interaction.reply({ + content: `Voice Channels moved to category.`, + ephemeral: true, + }); + } catch (error) { console.log(error); - console.error('Error moving voice channel to category:') - }; - + console.error("Error moving voice channel to category:"); + } } catch (error) { console.log(error); - await interaction.reply({ content:`There was an error while using the command.`, ephemeral: true }); + await interaction.reply({ + content: `There was an error while using the command.`, + ephemeral: true, + }); } }, }; diff --git a/commands/utility/ping.js b/commands/utility/ping.js index b2231b7..17b27c7 100644 --- a/commands/utility/ping.js +++ b/commands/utility/ping.js @@ -1,12 +1,12 @@ -const { SlashCommandBuilder } = require('discord.js'); +const { SlashCommandBuilder } = require("discord.js"); module.exports = { - category: 'utility', - cooldown: 5, - data: new SlashCommandBuilder() - .setName('ping') - .setDescription('Replies with Pong!'), - async execute(interaction) { - await interaction.reply('Pong!'); - }, -}; \ No newline at end of file + category: "utility", + cooldown: 5, + data: new SlashCommandBuilder() + .setName("ping") + .setDescription("Replies with Pong!"), + async execute(interaction) { + await interaction.reply("Pong!"); + }, +}; diff --git a/delete-commands.js b/delete-commands.js index 3754478..ab8a1ca 100644 --- a/delete-commands.js +++ b/delete-commands.js @@ -1,40 +1,46 @@ -const { REST, Routes } = require('discord.js'); -require('dotenv').config(); +const { REST, Routes } = require("discord.js"); +require("dotenv").config(); const token = process.env.DISCORD_TOKEN; const clientId = process.env.CLIENTID; const guildId = process.env.SERVERID; -const fs = require('node:fs'); -const path = require('node:path'); +const fs = require("node:fs"); +const path = require("node:path"); const commands = []; // Grab all the command folders from the commands directory you created earlier -const foldersPath = path.join(__dirname, 'commands'); +const foldersPath = path.join(__dirname, "commands"); const commandFolders = fs.readdirSync(foldersPath); for (const folder of commandFolders) { - // Grab all the command files from the commands directory you created earlier - const commandsPath = path.join(foldersPath, folder); - const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); - // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment - for (const file of commandFiles) { - const filePath = path.join(commandsPath, file); - const command = require(filePath); - if ('data' in command && 'execute' in command) { - commands.push(command.data.toJSON()); - } else { - console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); - } - } + // Grab all the command files from the commands directory you created earlier + const commandsPath = path.join(foldersPath, folder); + const commandFiles = fs + .readdirSync(commandsPath) + .filter((file) => file.endsWith(".js")); + // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment + for (const file of commandFiles) { + const filePath = path.join(commandsPath, file); + const command = require(filePath); + if ("data" in command && "execute" in command) { + commands.push(command.data.toJSON()); + } else { + console.log( + `[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`, + ); + } + } } // Construct and prepare an instance of the REST module const rest = new REST().setToken(token); -rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: [] }) - .then(() => console.log('Successfully deleted all guild commands.')) - .catch(console.error); +rest + .put(Routes.applicationGuildCommands(clientId, guildId), { body: [] }) + .then(() => console.log("Successfully deleted all guild commands.")) + .catch(console.error); // for global commands -rest.put(Routes.applicationCommands(clientId), { body: [] }) - .then(() => console.log('Successfully deleted all application commands.')) - .catch(console.error); \ No newline at end of file +rest + .put(Routes.applicationCommands(clientId), { body: [] }) + .then(() => console.log("Successfully deleted all application commands.")) + .catch(console.error); diff --git a/deploy-commands.js b/deploy-commands.js index cb95a27..1a08536 100644 --- a/deploy-commands.js +++ b/deploy-commands.js @@ -1,36 +1,37 @@ -const { REST, Routes } = require('discord.js'); -require('dotenv').config(); +const { REST, Routes } = require("discord.js"); +require("dotenv").config(); const token = process.env.DISCORD_TOKEN; const clientId = process.env.CLIENTID; const guildId = process.env.SERVERID; -const fs = require('node:fs'); -const path = require('node:path'); +const fs = require("node:fs"); +const path = require("node:path"); const commands = []; const commandsGlobal = []; // Grab all the command folders from the commands directory you created earlier -const foldersPath = path.join(__dirname, 'commands'); +const foldersPath = path.join(__dirname, "commands"); const commandFolders = fs.readdirSync(foldersPath); for (const folder of commandFolders) { - // Grab all the command files from the commands directory you created earlier - const commandsPath = path.join(foldersPath, folder); - const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); - // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment - for (const file of commandFiles) { - const filePath = path.join(commandsPath, file); - const command = require(filePath); - if ('notglobal' in command === true) { - commands.push(command.data.toJSON()); - } - else { - if ('data' in command && 'execute' in command) { - commandsGlobal.push(command.data.toJSON()); - } //else { - //console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); - //} - } - } + // Grab all the command files from the commands directory you created earlier + const commandsPath = path.join(foldersPath, folder); + const commandFiles = fs + .readdirSync(commandsPath) + .filter((file) => file.endsWith(".js")); + // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment + for (const file of commandFiles) { + const filePath = path.join(commandsPath, file); + const command = require(filePath); + if ("notglobal" in command === true) { + commands.push(command.data.toJSON()); + } else { + if ("data" in command && "execute" in command) { + commandsGlobal.push(command.data.toJSON()); + } //else { + //console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); + //} + } + } } // Construct and prepare an instance of the REST module @@ -38,25 +39,32 @@ const rest = new REST().setToken(token); // and deploy your commands! (async () => { - try { - console.log(`Started refreshing ${commands.length} application (/) commands.`); - console.log(`Started refreshing ${commandsGlobal.length} global (/) commands.`); + try { + console.log( + `Started refreshing ${commands.length} application (/) commands.`, + ); + console.log( + `Started refreshing ${commandsGlobal.length} global (/) commands.`, + ); - // The put method is used to fully refresh all commands in the guild with the current set - const data = await rest.put( - Routes.applicationGuildCommands(clientId, guildId), - { body: commands }, - ); + // The put method is used to fully refresh all commands in the guild with the current set + const data = await rest.put( + Routes.applicationGuildCommands(clientId, guildId), + { body: commands }, + ); - const dataGlobal = await rest.put( - Routes.applicationCommands(clientId), - { body: commandsGlobal }, - ); + const dataGlobal = await rest.put(Routes.applicationCommands(clientId), { + body: commandsGlobal, + }); - console.log(`Successfully reloaded ${data.length} application (/) commands.`); - console.log(`Successfully reloaded ${dataGlobal.length} global (/) commands.`); - } catch (error) { - // And of course, make sure you catch and log any errors! - console.error(error); - } -})(); \ No newline at end of file + console.log( + `Successfully reloaded ${data.length} application (/) commands.`, + ); + console.log( + `Successfully reloaded ${dataGlobal.length} global (/) commands.`, + ); + } catch (error) { + // And of course, make sure you catch and log any errors! + console.error(error); + } +})(); diff --git a/eslint.config.cjs b/eslint.config.cjs new file mode 100644 index 0000000..a54948c --- /dev/null +++ b/eslint.config.cjs @@ -0,0 +1,33 @@ +const globals = require("globals"); +const js = require("@eslint/js"); +const prettier = require("eslint-plugin-prettier"); + +module.exports = [ + { + files: ['**/*.js', '**/*.js'], + languageOptions: { + ecmaVersion: "latest", + sourceType: "commonjs", + globals: { + ...globals.browser, + ...globals.node, + myCustomGlobal: "readonly" + } + }, + plugins: { + prettier: prettier + }, + }, + js.configs.recommended, + { + files: ['**/*.js', '**/*.js'], + rules: { + 'linebreak-style': 0, + 'max-len': ['error', {'code': 120}], + ...prettier.configs.recommended.rules + }, + }, + { + ignores: ['node-modules/*'], + }, +]; \ No newline at end of file diff --git a/events/interactionCreate.js b/events/interactionCreate.js index e049258..2fd7d36 100644 --- a/events/interactionCreate.js +++ b/events/interactionCreate.js @@ -1,51 +1,66 @@ -const { Events } = require('discord.js'); +const { Events } = require("discord.js"); module.exports = { - name: Events.InteractionCreate, - async execute(interaction) { - if (!interaction.isChatInputCommand()) return; - - const command = interaction.client.commands.get(interaction.commandName); - - if (!command) { - console.error(`No command matching ${interaction.commandName} was found.`); - return; - } - - // Cooldowns - const { cooldowns } = interaction.client; - - if (!cooldowns.has(command.data.name)) { - cooldowns.set(command.data.name, new Collection()); - } - - const now = Date.now(); - const timestamps = cooldowns.get(command.data.name); - const defaultCooldownDuration = 3; - const cooldownAmount = (command.cooldown ?? defaultCooldownDuration) * 1_000; - - if (timestamps.has(interaction.user.id)) { - const expirationTime = timestamps.get(interaction.user.id) + cooldownAmount; - - if (now < expirationTime) { - const expiredTimestamp = Math.round(expirationTime / 1_000); - return interaction.reply({ content: `Please wait, you are on a cooldown for \`${command.data.name}\`. You can use it again .`, ephemeral: true }); - } - } - - timestamps.set(interaction.user.id, now); - setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); - - - try { - await command.execute(interaction); - } catch (error) { - console.error(error); - if (interaction.replied || interaction.deferred) { - await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true }); - } else { - await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true }); - } - } - }, -}; \ No newline at end of file + name: Events.InteractionCreate, + async execute(interaction) { + if (!interaction.isChatInputCommand()) return; + + const command = interaction.client.commands.get(interaction.commandName); + + if (!command) { + console.error( + `No command matching ${interaction.commandName} was found.`, + ); + return; + } + + // Cooldowns + const { cooldowns } = interaction.client; + + if (!cooldowns.has(command.data.name)) { + // TODO: Collection isn't a built in class, this needs to be addressed... + cooldowns.set(command.data.name, new Collection()); + } + + const now = Date.now(); + const timestamps = cooldowns.get(command.data.name); + const defaultCooldownDuration = 3; + const cooldownAmount = + (command.cooldown ?? defaultCooldownDuration) * 1_000; + + if (timestamps.has(interaction.user.id)) { + const expirationTime = + timestamps.get(interaction.user.id) + cooldownAmount; + + if (now < expirationTime) { + const expiredTimestamp = Math.round(expirationTime / 1_000); + return interaction.reply({ + content: + `Please wait, you are on a cooldown for \`${command.data.name}\`.` + + ` You can use it again .`, + ephemeral: true, + }); + } + } + + timestamps.set(interaction.user.id, now); + setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); + + try { + await command.execute(interaction); + } catch (error) { + console.error(error); + if (interaction.replied || interaction.deferred) { + await interaction.followUp({ + content: "There was an error while executing this command!", + ephemeral: true, + }); + } else { + await interaction.reply({ + content: "There was an error while executing this command!", + ephemeral: true, + }); + } + } + }, +}; diff --git a/events/ready.js b/events/ready.js index 2d254c5..ab5420c 100644 --- a/events/ready.js +++ b/events/ready.js @@ -1,9 +1,9 @@ -const { Events } = require('discord.js'); +const { Events } = require("discord.js"); module.exports = { - name: Events.ClientReady, - once: true, - execute(client) { - console.log(`Ready! Logged in as ${client.user.tag}`); - }, -}; \ No newline at end of file + name: Events.ClientReady, + once: true, + execute(client) { + console.log(`Ready! Logged in as ${client.user.tag}`); + }, +}; diff --git a/index.js b/index.js index 10da836..8657ffd 100644 --- a/index.js +++ b/index.js @@ -1,259 +1,308 @@ - // Invoke necessary modules for the bot to run - -const { Client, Collection, Events, ActivityType, GatewayIntentBits, GuildPresences, ChannelType, EmbedBuilder, PermissionFlagsBits, PermissionsBitField, ActionRowBuilder, ButtonBuilder, ButtonStyle, } = require('discord.js'); -require('dotenv').config(); -const fs = require('node:fs'); -const path = require('node:path'); -const { channelOwners } = require('./methods/channelowner'); -const { togglePrivate } = require('./methods/private'); -const { channel } = require('node:diagnostics_channel'); +// Invoke necessary modules for the bot to run + +const { + Client, + Collection, + Events, + GatewayIntentBits, + ChannelType, + EmbedBuilder, + PermissionFlagsBits, + ActionRowBuilder, + ButtonBuilder, + ButtonStyle, +} = require("discord.js"); + +require("dotenv").config(); +const fs = require("node:fs"); +const path = require("node:path"); +const { channelOwners } = require("./methods/channelowner"); +const { togglePrivate } = require("./methods/private"); const token = process.env.DISCORD_TOKEN; -const FIELD_CATERGORYID_NAME = "CATEGORYID" -const FIELD_VOICECREATECHANNELID_NAME = "VOICECREATECHANNELID" +const FIELD_CATERGORYID_NAME = "CATEGORYID"; +const FIELD_VOICECREATECHANNELID_NAME = "VOICECREATECHANNELID"; /* function getValueFromField(fieldName, line) - * + * * description: Gets the value assigned to a field. Assumes one line in the format: = "" - * + * * parameters: string fieldName: name of the field to get * string line: line to get the field from - * + * * Returns: Null if the field cannot be found or the file otherwise does not match. if a match is found */ -function getValueFromField(fieldName, line) -{ - re = RegExp('^' + fieldName + '\\s*=\\s*\"(.*)\"') - matches = re.exec(line) - - if(matches == null) - { - return null // Group 1 - } - else - { - return matches[1] // Group 1 - } +function getValueFromField(fieldName, line) { + const re = RegExp("^" + fieldName + '\\s*=\\s*"(.*)"'); + const matches = re.exec(line); + + if (matches == null) { + return null; // Group 1 + } else { + return matches[1]; // Group 1 + } } /* function readSettingsFile() - * + * * description: Reads settings.cfg into a structure of the form {category, voiceChannelId} - * + * * parameters: None - * + * * Returns: A structure with the parameters category and voiceChannelId */ -function readSettingsFile(guild) -{ - fileContents = fs.readFileSync(`./globalserversettings/setupsettings/${guild}/settings.cfg`, 'utf8') - const lines = fileContents.split('\n') - settingsFile = {} - for (const line of lines) - { - if(line.startsWith(FIELD_CATERGORYID_NAME)) - { - settingsFile.category = getValueFromField(FIELD_CATERGORYID_NAME, line) - - if(settingsFile.category === null) - log.error(`Could not find the field ${FIELD_CATERGORYID_NAME}`) - } - else if(line.startsWith(FIELD_VOICECREATECHANNELID_NAME)) - { - settingsFile.voiceChannelId = getValueFromField(FIELD_VOICECREATECHANNELID_NAME, line) - if(settingsFile.voiceChannelId === null) - log.error(`Could not find the field ${FIELD_VOICECREATECHANNELID_NAME}`) - } +function readSettingsFile(guild) { + const fileContents = fs.readFileSync( + `./globalserversettings/setupsettings/${guild}/settings.cfg`, + "utf8", + ); + const lines = fileContents.split("\n"); + const settingsFile = {}; + for (const line of lines) { + if (line.startsWith(FIELD_CATERGORYID_NAME)) { + settingsFile.category = getValueFromField(FIELD_CATERGORYID_NAME, line); + + if (settingsFile.category === null) + console.error(`Could not find the field ${FIELD_CATERGORYID_NAME}`); + } else if (line.startsWith(FIELD_VOICECREATECHANNELID_NAME)) { + settingsFile.voiceChannelId = getValueFromField( + FIELD_VOICECREATECHANNELID_NAME, + line, + ); + if (settingsFile.voiceChannelId === null) + console.error( + `Could not find the field ${FIELD_VOICECREATECHANNELID_NAME}`, + ); } - - return settingsFile + } + + return settingsFile; } /* function checkIdInFile(channelid) - * + * * description: Creates a settings file for the guild - * + * * parameters: string channelid: The channel id to check for in the settings file * string guildId: The guild id to get the settings for * - * + * * Returns: None */ function checkIdInFile(guildId, channelid) { - const filePath = `./globalserversettings/permvoice/${guildId}/settings.cfg`; - - try { - // Read the existing settings file - let fileContent = fs.readFileSync(filePath, 'utf-8'); - - // Split the file into lines - const lines = fileContent.split('\n'); - - for (const line of lines) { - if (line.trim() === channelid) { - return true; // Channel id found in the file - } - } - - return false; // Channel id not found in the file - - } catch (error) { - //console.error('Error reading settings file:', error); - return false; - } + const filePath = `./globalserversettings/permvoice/${guildId}/settings.cfg`; + + try { + // Read the existing settings file + let fileContent = fs.readFileSync(filePath, "utf-8"); + + // Split the file into lines + const lines = fileContent.split("\n"); + + for (const line of lines) { + if (line.trim() === channelid) { + return true; // Channel id found in the file + } + } + + return false; // Channel id not found in the file + } catch { + //console.error('Error reading settings file:', error); + return false; + } } -const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildVoiceStates] }); +const client = new Client({ + intents: [ + GatewayIntentBits.Guilds, + GatewayIntentBits.GuildMembers, + GatewayIntentBits.DirectMessages, + GatewayIntentBits.GuildVoiceStates, + ], +}); client.cooldowns = new Collection(); client.commands = new Collection(); -const foldersPath = path.join(__dirname, 'commands'); +const foldersPath = path.join(__dirname, "commands"); const commandFolders = fs.readdirSync(foldersPath); for (const folder of commandFolders) { - const commandsPath = path.join(foldersPath, folder); - const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); - for (const file of commandFiles) { - const filePath = path.join(commandsPath, file); - const command = require(filePath); - if ('data' in command && 'execute' in command) { - client.commands.set(command.data.name, command); - } else { - console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`); - } - } + const commandsPath = path.join(foldersPath, folder); + const commandFiles = fs + .readdirSync(commandsPath) + .filter((file) => file.endsWith(".js")); + for (const file of commandFiles) { + const filePath = path.join(commandsPath, file); + const command = require(filePath); + if ("data" in command && "execute" in command) { + client.commands.set(command.data.name, command); + } else { + console.log( + `[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`, + ); + } + } } -client.once(Events.ClientReady, readyClient => { - console.log(`Ready! Logged in as ${readyClient.user.tag}`); +client.once(Events.ClientReady, (readyClient) => { + console.log(`Ready! Logged in as ${readyClient.user.tag}`); }); -client.on('voiceStateUpdate', - (oldState, newState) => { - //Handle the channel deletion if the channel is empty - if (oldState.channelId) { - const guild = oldState.guild; - settings = readSettingsFile(guild.id) - guild.channels.fetch(oldState.channelId) - - //Handle Channel deletion - .then(oldChannel => { - if (oldChannel.parentId === settings.category && oldChannel.members.size === 0 && oldChannel.id !== settings.voiceChannelId) { - if (checkIdInFile(guild.id, oldChannel.id)) { - return; - } - channelOwners.delete(oldChannel.id); - oldChannel.delete() - .then(() => { - //console.log(`Deleted empty channel: ${oldChannel.name}`); - }) - .catch(error => { - //console.error('Error deleting channel:', error); - }); - return; - } - }) -} - //Handle the channel creation if the user joins the create channel - if (newState.channelId) { - const guild = newState.guild; - settings = readSettingsFile(guild.id) - if (newState.channelId === settings.voiceChannelId) { - //const guild = newState.guild; - - const category = guild.channels.cache.get(settings.category); - if (category && category.type === ChannelType.GuildCategory) { - guild.channels.create( { - name: `${newState.member.user.username}'s Channel`, - type: ChannelType.GuildVoice, - parent: category.id, - permissionOverwrites: [ - { - id: newState.member.id, - allow: [PermissionFlagsBits.Connect, PermissionFlagsBits.Speak, PermissionFlagsBits.ViewChannel], - }, - ], - }) - .then(channel => { - newState.member.voice.setChannel(channel); - //console.log(`Created voice channel: ${channel.name}`); - - //Set the owner of the channel to the one the user who created the channel - channelOwners.set(channel.id, newState.member.id); - - //Set the channel's private state to false, this can be adjusted by the user toggling the channel's visibility via /private - togglePrivate.set(channel.id, 0); - - const embed = new EmbedBuilder() - .setTitle("✏️ **Control your temporary channel**") - .setDescription("**Use the following buttons to modify the channel's settings or various slash commands to control how the channel works.\n\nYou can use commands such as:\n\nUtility Commands:\n`/rename`\n`/lock`\n`/private`\n`/bitrate`\n`/limit`\n`/region`\n`/waitingroom`\n\nModeration Comamnds:\n`/ban`- To ban a user from your channel\n`/unban` - To unban a user from your channel\n`/kick` - Remove a user from the channel without banning\n`/owner` - Change the owner of the channel (requires you to own the said channel.\n\n **") - .setColor("#f5cc00") - .setTimestamp(); - - const actionRow = new ActionRowBuilder() - .addComponents( - new ButtonBuilder() - .setCustomId('button_id') - .setLabel('Click Me') - .setStyle(ButtonStyle.Primary) - ); - //channel.send({ content: '', embeds: [embed], components: [actionRow] }); - channel.send({ content: '', embeds: [embed] }); - }) - .catch(error => { - //console.error('Error creating voice channel:', error); - }); - return; - } - }} +client.on("voiceStateUpdate", (oldState, newState) => { + //Handle the channel deletion if the channel is empty + if (oldState.channelId) { + const guild = oldState.guild; + const settings = readSettingsFile(guild.id); + guild.channels + .fetch(oldState.channelId) + + //Handle Channel deletion + .then((oldChannel) => { + if ( + oldChannel.parentId === settings.category && + oldChannel.members.size === 0 && + oldChannel.id !== settings.voiceChannelId + ) { + if (checkIdInFile(guild.id, oldChannel.id)) { + return; + } + channelOwners.delete(oldChannel.id); + oldChannel + .delete() + .then(() => { + //console.log(`Deleted empty channel: ${oldChannel.name}`); + }) + .catch(() => { + //console.error('Error deleting channel:', error); + }); + return; + } + }); + } + //Handle the channel creation if the user joins the create channel + if (newState.channelId) { + const guild = newState.guild; + const settings = readSettingsFile(guild.id); + if (newState.channelId === settings.voiceChannelId) { + //const guild = newState.guild; + const category = guild.channels.cache.get(settings.category); + if (category && category.type === ChannelType.GuildCategory) { + guild.channels + .create({ + name: `${newState.member.user.username}'s Channel`, + type: ChannelType.GuildVoice, + parent: category.id, + permissionOverwrites: [ + { + id: newState.member.id, + allow: [ + PermissionFlagsBits.Connect, + PermissionFlagsBits.Speak, + PermissionFlagsBits.ViewChannel, + ], + }, + ], + }) + .then((channel) => { + newState.member.voice.setChannel(channel); + //console.log(`Created voice channel: ${channel.name}`); + //Set the owner of the channel to the one the user who created the channel + channelOwners.set(channel.id, newState.member.id); + + // Set the channel's private state to false, + // this can be adjusted by the user toggling the channel's visibility via /private + togglePrivate.set(channel.id, 0); + + const embed = new EmbedBuilder() + .setTitle("✏️ **Control your temporary channel**") + .setDescription( + "**Use the following buttons to modify the channel's " + + "settings or various slash commands to control how the channel works." + + "\n\nYou can use commands such as:\n\nUtility Commands:\n`/rename`\n`/lock`" + + "\n`/private`\n`/bitrate`\n`/limit`\n`/region`\n`/waitingroom`\n\n" + + "Moderation Comamnds:\n`/ban`- To ban a user from your channel\n" + + "`/unban` - To unban a user from your channel\n`/kick` - Remove a user from" + + " the channel without banning\n`/owner` - Change the owner of the channel" + + " (requires you to own the said channel.\n\n **", + ) + .setColor("#f5cc00") + .setTimestamp(); + + new ActionRowBuilder().addComponents( + new ButtonBuilder() + .setCustomId("button_id") + .setLabel("Click Me") + .setStyle(ButtonStyle.Primary), + ); + //channel.send({ content: '', embeds: [embed], components: [actionRow] }); + channel.send({ content: "", embeds: [embed] }); + }) + .catch(() => { + //console.error('Error creating voice channel:', error); + }); + return; + } + } + } }); -client.on(Events.InteractionCreate, async interaction => { - if (!interaction.isChatInputCommand()) return; - const command = client.commands.get(interaction.commandName); - - //TODO Add a check for the command to see if it is a button press - - if (!command) { - console.error(`No command matching ${interaction.commandName} was found.`); - return; - } - - const { cooldowns } = interaction.client; - - if (!cooldowns.has(command.data.name)) { - cooldowns.set(command.data.name, new Collection()); - } - - const now = Date.now(); - const timestamps = cooldowns.get(command.data.name); - const defaultCooldownDuration = 3; - const cooldownAmount = (command.cooldown ?? defaultCooldownDuration) * 1000; - - if (timestamps.has(interaction.user.id)) { - const expirationTime = timestamps.get(interaction.user.id) + cooldownAmount; - - if (now < expirationTime) { - const expiredTimestamp = Math.round(expirationTime / 1000); - return interaction.reply({ content: `Please wait, you are on a cooldown for \`${command.data.name}\`. You can use it again .`, ephemeral: true }); - } - } - - timestamps.set(interaction.user.id, now); - setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); - - try { - await command.execute(interaction); - } catch (error) { - console.error(error); - if (interaction.replied || interaction.deferred) { - await interaction.followUp({ content: 'There was an error while executing this command!', ephemeral: true }); - } else { - await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true }); - } - } +client.on(Events.InteractionCreate, async (interaction) => { + if (!interaction.isChatInputCommand()) return; + const command = client.commands.get(interaction.commandName); + + //TODO Add a check for the command to see if it is a button press + + if (!command) { + console.error(`No command matching ${interaction.commandName} was found.`); + return; + } + + const { cooldowns } = interaction.client; + + if (!cooldowns.has(command.data.name)) { + cooldowns.set(command.data.name, new Collection()); + } + + const now = Date.now(); + const timestamps = cooldowns.get(command.data.name); + const defaultCooldownDuration = 3; + const cooldownAmount = (command.cooldown ?? defaultCooldownDuration) * 1000; + + if (timestamps.has(interaction.user.id)) { + const expirationTime = timestamps.get(interaction.user.id) + cooldownAmount; + + if (now < expirationTime) { + const expiredTimestamp = Math.round(expirationTime / 1000); + return interaction.reply({ + content: + `Please wait, you are on a cooldown for \`${command.data.name}\`.` + + ` You can use it again .`, + ephemeral: true, + }); + } + } + + timestamps.set(interaction.user.id, now); + setTimeout(() => timestamps.delete(interaction.user.id), cooldownAmount); + + try { + await command.execute(interaction); + } catch (error) { + console.error(error); + if (interaction.replied || interaction.deferred) { + await interaction.followUp({ + content: "There was an error while executing this command!", + ephemeral: true, + }); + } else { + await interaction.reply({ + content: "There was an error while executing this command!", + ephemeral: true, + }); + } + } }); -client.login(token); \ No newline at end of file +client.login(token); diff --git a/methods/channelowner.js b/methods/channelowner.js index f3390b9..69462b7 100644 --- a/methods/channelowner.js +++ b/methods/channelowner.js @@ -1,7 +1,7 @@ -const Discord = require('discord.js'); +const Discord = require("discord.js"); /** * Collection for owners of a channel that is accessed in various files */ const channelOwners = new Discord.Collection(); -exports .channelOwners= channelOwners ; \ No newline at end of file +exports.channelOwners = channelOwners; diff --git a/methods/locks.js b/methods/locks.js index 54b67ea..d946958 100644 --- a/methods/locks.js +++ b/methods/locks.js @@ -1,7 +1,7 @@ -const Discord = require('discord.js'); +const Discord = require("discord.js"); /** * Collection for owners of a channel that is accessed in various files */ const toggleLock = new Discord.Collection(); -exports .toggleLock= toggleLock ; \ No newline at end of file +exports.toggleLock = toggleLock; diff --git a/methods/private.js b/methods/private.js index b5cedb3..50ca46c 100644 --- a/methods/private.js +++ b/methods/private.js @@ -1,7 +1,7 @@ -const Discord = require('discord.js'); +const Discord = require("discord.js"); /** * Collection for owners of a channel that is accessed in various files */ const togglePrivate = new Discord.Collection(); -exports .togglePrivate= togglePrivate ; \ No newline at end of file +exports.togglePrivate = togglePrivate; diff --git a/methods/waitingRoom.js b/methods/waitingRoom.js index 5b22974..d94ac39 100644 --- a/methods/waitingRoom.js +++ b/methods/waitingRoom.js @@ -1,7 +1,7 @@ -const Discord = require('discord.js'); +const Discord = require("discord.js"); /** * Collection for owners of a channel that is accessed in various files */ const waitingRoom = new Discord.Collection(); -exports .waitingRoom= waitingRoom ; \ No newline at end of file +exports.waitingRoom = waitingRoom; diff --git a/package-lock.json b/package-lock.json index adc764b..b707cb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,14 @@ "license": "MIT", "dependencies": { "discord.js": "^14.15.3", - "dotenv": "^16.4.5", - "sqlite3": "^5.1.7" + "dotenv": "^16.4.5" + }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "eslint": "^9.9.1", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", + "globals": "^15.9.0" } }, "node_modules/@discordjs/builders": { @@ -141,37 +147,180 @@ "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "license": "MIT", - "optional": true + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } }, - "node_modules/@npmcli/fs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", - "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", - "license": "ISC", - "optional": true, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", + "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", + "dev": true, "dependencies": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" + "@eslint/object-schema": "^2.1.4", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "license": "MIT", - "optional": true, + "node_modules/@eslint/eslintrc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", + "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", + "dev": true, "dependencies": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.9.1.tgz", + "integrity": "sha512-xIDQRsfg5hNBqHz04H1R3scSVwmI+KUbqjsQKHKQ1DAUSaUjYPReZZmS/5PNiKu1fUvzDd6H7DEDKACSEhu+TQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", + "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", + "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" } }, "node_modules/@sapphire/async-queue": { @@ -207,16 +356,6 @@ "npm": ">=7.0.0" } }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6" - } - }, "node_modules/@types/node": { "version": "22.1.0", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", @@ -245,246 +384,157 @@ "npm": ">=7.0.0" } }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "license": "ISC", - "optional": true - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "debug": "4" + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">= 6.0.0" + "node": ">=0.4.0" } }, - "node_modules/agentkeepalive": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", - "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", - "license": "MIT", - "optional": true, - "dependencies": { - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "license": "MIT", - "optional": true, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=8" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "optional": true, + "dev": true, "engines": { "node": ">=8" } }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "license": "ISC", - "optional": true - }, - "node_modules/are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "deprecated": "This package is no longer supported.", - "license": "ISC", - "optional": true, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" + "color-convert": "^2.0.1" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT", - "optional": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "license": "MIT", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } + "dev": true }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "license": "MIT", - "optional": true, + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" } }, - "node_modules/cacache": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", - "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", - "license": "ISC", - "optional": true, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "license": "ISC", + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "license": "MIT", - "optional": true, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, "engines": { - "node": ">=6" + "node": ">=7.0.0" } }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "license": "ISC", - "optional": true, - "bin": { - "color-support": "bin.js" - } + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "license": "MIT", - "optional": true + "dev": true }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "license": "ISC", - "optional": true + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } }, "node_modules/debug": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", - "license": "MIT", - "optional": true, + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -497,45 +547,11 @@ } } }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "license": "MIT", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "license": "MIT", - "optional": true - }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true }, "node_modules/discord-api-types": { "version": "0.37.83", @@ -581,397 +597,260 @@ "url": "https://dotenvx.com" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT", - "optional": true - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "license": "MIT", - "optional": true - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "license": "(MIT OR WTFPL)", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { - "node": ">=6" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "license": "MIT" - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT" - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "license": "MIT" - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" + "node": ">=10" }, - "engines": { - "node": ">= 8" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "license": "ISC", - "optional": true - }, - "node_modules/gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "deprecated": "This package is no longer supported.", - "license": "ISC", - "optional": true, - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", + "node_modules/eslint": { + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.9.1.tgz", + "integrity": "sha512-dHvhrbfr4xFQ9/dq+jcVneZMyRYLjggWjk6RVsIiHsP8Rz6yZ8LvZ//iU4TrZF+SXWG+JkNF2OyiZRvzgRDqMg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.11.0", + "@eslint/config-array": "^0.18.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "9.9.1", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.3.0", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.0.2", + "eslint-visitor-keys": "^4.0.0", + "espree": "^10.1.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "license": "MIT" + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "optional": true, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" }, "engines": { - "node": "*" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "license": "ISC", - "optional": true - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "license": "ISC", - "optional": true - }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "license": "BSD-2-Clause", - "optional": true - }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "license": "MIT", - "optional": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "url": "https://opencollective.com/eslint-plugin-prettier" }, - "engines": { - "node": ">= 6" + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } } }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "license": "MIT", - "optional": true, + "node_modules/eslint-scope": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", + "integrity": "sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==", + "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">= 6" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "ms": "^2.0.0" + "node_modules/eslint-visitor-keys": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", + "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "license": "MIT", - "optional": true, + "node_modules/espree": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", + "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", + "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "acorn": "^8.12.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "license": "MIT", - "optional": true, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, "engines": { - "node": ">=0.8.19" + "node": ">=0.10" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "license": "MIT", - "optional": true, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, "engines": { - "node": ">=8" + "node": ">=4.0" } }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "license": "ISC", - "optional": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "license": "ISC", - "optional": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" - }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "license": "MIT", - "optional": true, - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "engines": { - "node": ">= 12" + "node": ">=4.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "optional": true, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "license": "MIT", - "optional": true + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "license": "ISC", - "optional": true + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "license": "MIT", - "optional": true + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true }, - "node_modules/lodash.snakecase": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", - "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", - "license": "MIT" + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "license": "ISC", - "optional": true, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, "dependencies": { - "yallist": "^4.0.0" + "flat-cache": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=16.0.0" } }, - "node_modules/magic-bytes.js": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz", - "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==", - "license": "MIT" - }, - "node_modules/make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", - "license": "ISC", - "optional": true, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "license": "MIT", + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, "engines": { "node": ">=10" }, @@ -979,248 +858,242 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "optional": true, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": "*" + "node": ">=16" } }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true }, - "node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "license": "ISC", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "dependencies": { - "yallist": "^4.0.0" + "is-glob": "^4.0.3" }, "engines": { - "node": ">=8" + "node": ">=10.13.0" } }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, + "node_modules/globals": { + "version": "15.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.9.0.tgz", + "integrity": "sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==", + "dev": true, "engines": { - "node": ">= 8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", - "license": "MIT", - "optional": true, - "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" - }, - "optionalDependencies": { - "encoding": "^0.1.12" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, "engines": { - "node": ">= 8" + "node": ">= 4" } }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "license": "ISC", - "optional": true, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "dependencies": { - "minipass": "^3.0.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "license": "ISC", - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=0.8.19" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "license": "MIT", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "license": "MIT" - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT", - "optional": true - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "license": "MIT" - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "optional": true, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, "engines": { - "node": ">= 0.6" + "node": ">=8" } }, - "node_modules/node-abi": { - "version": "3.65.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.65.0.tgz", - "integrity": "sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA==", - "license": "MIT", + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { - "semver": "^7.3.5" + "argparse": "^2.0.1" }, - "engines": { - "node": ">=10" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/node-addon-api": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", - "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", - "license": "MIT" + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true }, - "node_modules/node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", - "license": "MIT", - "optional": true, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">= 10.12.0" + "node": ">= 0.8.0" } }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "license": "ISC", - "optional": true, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "deprecated": "This package is no longer supported.", - "license": "ISC", - "optional": true, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "license": "MIT" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "license": "MIT" + }, + "node_modules/magic-bytes.js": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz", + "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==", + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "*" } }, - "node_modules/once": { + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true }, "node_modules/openai/node_modules/@types/node": { "version": "18.19.43", @@ -1239,14 +1112,30 @@ "extraneous": true, "license": "MIT" }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "license": "MIT", - "optional": true, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" @@ -1255,133 +1144,102 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prebuild-install": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", - "license": "MIT", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" + "p-limit": "^3.0.2" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/promise-inflight": { + "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "license": "ISC", - "optional": true - }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "license": "MIT", - "optional": true, + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" + "callsites": "^3.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" } }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, "engines": { - "node": ">= 6" + "node": ">= 0.8.0" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "license": "MIT", - "optional": true, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, "engines": { - "node": ">= 4" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "optional": true, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, "dependencies": { - "glob": "^7.1.3" + "fast-diff": "^1.1.2" }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=6.0.0" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -1395,66 +1253,32 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT", - "optional": true + ] }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=4" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC", - "optional": true - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "license": "ISC", - "optional": true - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, "funding": [ { "type": "github", @@ -1469,118 +1293,27 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "queue-microtask": "^1.2.2" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", - "license": "MIT", - "optional": true, - "dependencies": { - "ip-address": "^9.0.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", - "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "license": "BSD-3-Clause", - "optional": true - }, - "node_modules/sqlite3": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.7.tgz", - "integrity": "sha512-GGIyOiFaG+TUra3JIfkI/zGP8yZYLPQ0pl1bH+ODjiX57sPhrLU5sQJn1y9bDKZUFYkX1crlrPfSYt0BKKdkog==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^7.0.0", - "prebuild-install": "^7.1.1", - "tar": "^6.1.11" - }, - "optionalDependencies": { - "node-gyp": "8.x" - }, - "peerDependencies": { - "node-gyp": "8.x" - }, - "peerDependenciesMeta": { - "node-gyp": { - "optional": true - } - } - }, - "node_modules/ssri": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", - "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", - "license": "ISC", - "optional": true, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "dependencies": { - "minipass": "^3.1.1" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">= 8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" + "node": ">=8" } }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "optional": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "engines": { "node": ">=8" } @@ -1589,8 +1322,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "optional": true, + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1599,73 +1331,50 @@ } }, "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "license": "MIT", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "license": "ISC", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "license": "MIT", + "node_modules/synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC" - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "license": "MIT", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=6" + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" } }, - "node_modules/tar/node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "license": "ISC", - "engines": { - "node": ">=8" - } + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true }, "node_modules/ts-mixer": { "version": "6.0.4", @@ -1679,16 +1388,16 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "license": "0BSD" }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, "dependencies": { - "safe-buffer": "^5.0.1" + "prelude-ls": "^1.2.1" }, "engines": { - "node": "*" + "node": ">= 0.8.0" } }, "node_modules/undici": { @@ -1706,38 +1415,20 @@ "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", "license": "MIT" }, - "node_modules/unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "license": "ISC", - "optional": true, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { - "unique-slug": "^2.0.0" + "punycode": "^2.1.0" } }, - "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "license": "ISC", - "optional": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "license": "ISC", - "optional": true, + "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -1748,22 +1439,15 @@ "node": ">= 8" } }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "license": "ISC", - "optional": true, - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, "node_modules/ws": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", @@ -1785,11 +1469,17 @@ } } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 4ff5e11..a3c83cf 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,20 @@ "description": "Discord Bot", "main": "index.js", "scripts": { - "test": "test" + "lint": "eslint", + "fix": "eslint --fix" }, "author": "", "license": "MIT", "dependencies": { "discord.js": "^14.15.3", - "dotenv": "^16.4.5", - "sqlite3": "^5.1.7" + "dotenv": "^16.4.5" + }, + "devDependencies": { + "@eslint/js": "^9.9.1", + "eslint": "^9.9.1", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.2.1", + "globals": "^15.9.0" } }