From 700a8c696c5aeb319cf10342527f7bc9d6a5d876 Mon Sep 17 00:00:00 2001 From: Noah-Moring Date: Wed, 11 Dec 2024 12:20:40 -0500 Subject: [PATCH 01/10] toggle-feature-v1 toggle feature working in this version, had to make modifications to the discordApp file because I didn't register the toggle as a command. The code is just looking for an instance where a member sends the message "!toggle" and then seeing if they have the permissions to toggle the bot. --- server-configs.json | 7 ++ src/discordApp.ts | 144 ++++++++++++++++++++------------ src/serverConfigManager.test.ts | 66 +++++++++++++++ src/serverConfigManager.ts | 99 ++++++++++++++++++++++ test-server-configs.json | 7 ++ 5 files changed, 271 insertions(+), 52 deletions(-) create mode 100644 server-configs.json create mode 100644 src/serverConfigManager.test.ts create mode 100644 src/serverConfigManager.ts create mode 100644 test-server-configs.json diff --git a/server-configs.json b/server-configs.json new file mode 100644 index 0000000..2ca65c8 --- /dev/null +++ b/server-configs.json @@ -0,0 +1,7 @@ +{ + "1294893558024638475": { + "isEnabled": true, + "lastToggled": "2024-12-11T17:16:01.394Z", + "toggledBy": "186318354422824960" + } +} \ No newline at end of file diff --git a/src/discordApp.ts b/src/discordApp.ts index c11a3a3..927ebd5 100644 --- a/src/discordApp.ts +++ b/src/discordApp.ts @@ -1,19 +1,19 @@ -import "dotenv/config"; -import analyzeTone from "./gptRequests"; -import { Client, GatewayIntentBits, Events, ClientUser } from "discord.js"; -import { clarify, embed, ping, tone } from "./interactions" - -// define a bunch of emojis we'll use frequently here. either unicode character or just the id -const reactions = { - heart: "❤️" -}; - - -async function launchBot(): Promise { - // the client has to declare the features it uses up front so discord.js kno9ws if it can - // ignore some fields and callbacks to save on hosting resources. here are some links to clarify: - // discord.js: https://discordjs.guide/popular-topics/intents.html#error-disallowed-intents - // discord API: https://discord.com/developers/docs/topics/gateway#list-of-intents + +import 'dotenv/config'; +import analyzeTone from './gptRequests.js'; +import serverConfigManager from './serverConfigManager.js'; +import { + Client, + GatewayIntentBits, + Events, + PermissionsBitField, + EmbedBuilder, + Message, + Interaction +} from 'discord.js'; +import { clarify, embed, ping, tone } from './interactions.js'; + +async function launchBot(): Promise { const client = new Client({ intents: [ GatewayIntentBits.GuildEmojisAndStickers, @@ -25,10 +25,6 @@ async function launchBot(): Promise { ], }); - // client.on takes an event and a function, and calls that function once the evnt is called. - // eventually, it may be wise to make each callback its own function for readibility. - - // called when bot is live client.on(Events.ClientReady, () => { if (client.user) { console.log(`client "ready": Logged in as ${client.user.tag}!`); @@ -37,61 +33,105 @@ async function launchBot(): Promise { } }); - // called when a message is sent - client.on(Events.MessageCreate, async (message) => { - // message.content shows the body of the messages, with a few quirks. For one, - // any emojis will be in the discord format, and pings will show up as some - // arbitrary snowflake (ask me or look it up) e.g. `<@1295481669603688499>` + client.on(Events.MessageCreate, async (message: Message) => { + // Special handling for toggle command - process it regardless of bot's enabled status + if (message.content === '!toggle') { + // Ensure the command is in a guild + if (!message.guild) return; + + // Check for 'Manage Server' permission + if (!message.member?.permissions.has(PermissionsBitField.Flags.ManageGuild)) { + return message.reply('You need "Manage Server" permission to toggle the bot!'); + } + + // Ensure message.author and message.guild are not null + const authorId = message.author.id; + const guildId = message.guild.id; + + // Toggle server status + const serverConfig = serverConfigManager.toggleServerStatus(guildId, authorId); + + // Create an embed to show the new status + const embed = new EmbedBuilder() + .setColor(serverConfig.isEnabled ? '#00FF00' : '#FF0000') + .setTitle('Bot Status') + .setDescription(`Bot is now ${serverConfig.isEnabled ? 'enabled ✅' : 'disabled ❌'} in this server`) + .addFields( + { + name: 'Toggled By', + value: serverConfig.toggledBy ? `<@${serverConfig.toggledBy}>` : 'Unknown', + inline: true + }, + { + name: 'Last Toggled', + value: serverConfig.lastToggled + ? new Date(serverConfig.lastToggled).toLocaleString() + : 'Never', + inline: true + } + ) + .setTimestamp(); - console.log(message.content); - if (message.mentions.has(client.user as ClientUser)) { - // console.log("mentioned!"); - // message.react(reactions.heart); + await message.reply({ embeds: [embed] }); + return; + } - // check if the message has a reference (a parent message aka if this message is a reply to another one) - // if so, and the message is just tagging the bot, analyze the parent message - // if not, analyze the sent message instead + // For all other commands, check if bot is enabled for this server + if (message.guild && !serverConfigManager.isServerEnabled(message.guild.id)) { + return; + } - var tone; - if (message.reference !== null){ - var parentMessage = await message.fetchReference() + // Rest of your existing message handling logic + if (message.mentions.has(client.user!)) { + let tone; + if (message.reference !== null) { + const parentMessage = await message.fetchReference(); + // if replied to the bot without tagging the bot, don't analyze - if (parentMessage.author.id === client.user?.id && - !message.content.includes("<@" + client.user?.id + ">" )){ + if (parentMessage.author.id === client.user?.id && + !message.content.includes(`<@${client.user?.id}>`)) { return; } - if (message.content === "<@" + client.user?.id + ">" ){ + + if (message.content === `<@${client.user?.id}>`) { tone = await analyzeTone(parentMessage.content); - } - else { + } else { tone = await analyzeTone(message.content); } } else { tone = await analyzeTone(message.content); } + message.reply(tone); } }); - - // called when an interaction (e.g. slash command) is called. there are a bunch of different - // interaction types, but we'll see which we need as time goes on. - // TODO: find references for this - client.on(Events.InteractionCreate, async (interaction) => { + + // Handle other interactions similar to message event + client.on(Events.InteractionCreate, async (interaction: Interaction) => { + // Check if interaction is in a guild and bot is enabled for this server + // But allow the toggle command to work regardless + if (interaction.guild && !serverConfigManager.isServerEnabled(interaction.guild.id)) { + return; + } + if (interaction.isChatInputCommand()) { - if (interaction.commandName === "ping") await ping(interaction); - if (interaction.commandName === "embed") await embed(interaction); + if (interaction.commandName === "ping") + await ping(interaction); + if (interaction.commandName === "embed") + await embed(interaction); } else if (interaction.isMessageContextMenuCommand()) { - if (interaction.commandName === "Tone") await tone(interaction); - if (interaction.commandName === "Clarify") await clarify(interaction); + if (interaction.commandName === "Tone") + await tone(interaction); + if (interaction.commandName === "Clarify") + await clarify(interaction); } else { console.log(interaction); } }); // attempt to connect - client.login(process.env.DISCORD_TOKEN); - + await client.login(process.env.DISCORD_TOKEN); return client; } -export default launchBot; +export default launchBot; \ No newline at end of file diff --git a/src/serverConfigManager.test.ts b/src/serverConfigManager.test.ts new file mode 100644 index 0000000..849d625 --- /dev/null +++ b/src/serverConfigManager.test.ts @@ -0,0 +1,66 @@ +import { describe, it, beforeEach, expect } from '@jest/globals'; +import fs from 'fs'; +import path from 'path'; +import { ServerConfigManager } from './serverConfigManager'; + +describe('ServerConfigManager', () => { + const TEST_CONFIG_PATH = './test-server-configs.json'; + let serverConfigManager: ServerConfigManager; + + beforeEach(() => { + // Clean up test file before each test + if (fs.existsSync(TEST_CONFIG_PATH)) { + fs.unlinkSync(TEST_CONFIG_PATH); + } + serverConfigManager = new ServerConfigManager(TEST_CONFIG_PATH); + }); + + it('should successfully toggle server status from enabled to disabled', () => { + const guildId = '123456789'; + const userId = '987654321'; + + // Verify initial state is enabled + expect(serverConfigManager.isServerEnabled(guildId)).toBe(true); + + // Toggle to disabled + const config = serverConfigManager.toggleServerStatus(guildId, userId); + + // Verify the toggle + expect(config.isEnabled).toBe(false); + expect(config.toggledBy).toBe(userId); + expect(config.lastToggled).not.toBeNull(); + + // Verify the state persisted + expect(serverConfigManager.isServerEnabled(guildId)).toBe(false); + }); + + it('should toggle server status multiple times successfully', () => { + const guildId = '123456789'; + const userId = '987654321'; + + // First toggle (true -> false) + let config = serverConfigManager.toggleServerStatus(guildId, userId); + expect(config.isEnabled).toBe(false); + + // Second toggle (false -> true) + config = serverConfigManager.toggleServerStatus(guildId, userId); + expect(config.isEnabled).toBe(true); + + // Third toggle (true -> false) + config = serverConfigManager.toggleServerStatus(guildId, userId); + expect(config.isEnabled).toBe(false); + }); + + it('should persist server status between instance recreations', () => { + const guildId = '123456789'; + const userId = '987654321'; + + // Toggle with first instance + serverConfigManager.toggleServerStatus(guildId, userId); + expect(serverConfigManager.isServerEnabled(guildId)).toBe(false); + + // Create new instance and verify state persisted + const newServerConfigManager = new ServerConfigManager(TEST_CONFIG_PATH); + expect(newServerConfigManager.isServerEnabled(guildId)).toBe(false); + }); +}); \ No newline at end of file diff --git a/src/serverConfigManager.ts b/src/serverConfigManager.ts new file mode 100644 index 0000000..349f06f --- /dev/null +++ b/src/serverConfigManager.ts @@ -0,0 +1,99 @@ + +import fs from 'fs'; +import path from 'path'; + +interface ServerConfig { + isEnabled: boolean; + lastToggled: string | null; + toggledBy: string | null; +} + +class ServerConfigManager { + private configPath: string; + private serverStates: Map; + + constructor(configPath: string = './server-configs.json') { + this.configPath = path.resolve(configPath); + this.serverStates = new Map(); + + // Load initial states from file if it exists + try { + if (fs.existsSync(this.configPath)) { + const savedConfigs = JSON.parse(fs.readFileSync(this.configPath, 'utf8')); + for (const [guildId, config] of Object.entries(savedConfigs)) { + this.serverStates.set(guildId, config as ServerConfig); + } + console.log('[ServerConfigManager] Loaded existing configurations'); + } + } catch (error) { + console.error('[ServerConfigManager] Error loading initial config:', error); + } + } + + private saveToFile(): void { + try { + const configObject = Object.fromEntries(this.serverStates); + fs.writeFileSync(this.configPath, JSON.stringify(configObject, null, 2)); + console.log('[ServerConfigManager] Saved configurations to file'); + } catch (error) { + console.error('[ServerConfigManager] Error saving to file:', error); + } + } + + public toggleServerStatus(guildId: string, userId: string): ServerConfig { + console.log(`[ServerConfigManager] Attempting to toggle server ${guildId}`); + + // Get current state or create default + let currentConfig = this.serverStates.get(guildId) || { + isEnabled: true, + lastToggled: null, + toggledBy: null + }; + + // Log before state + console.log('[ServerConfigManager] Before toggle:', currentConfig); + + // Create new config object with toggled state + const newConfig: ServerConfig = { + isEnabled: !currentConfig.isEnabled, + lastToggled: new Date().toISOString(), + toggledBy: userId + }; + + // Update in-memory state + this.serverStates.set(guildId, newConfig); + + // Log after state + console.log('[ServerConfigManager] After toggle:', newConfig); + + // Save to file as backup + this.saveToFile(); + + return newConfig; + } + + public isServerEnabled(guildId: string): boolean { + // If no state is stored, default to enabled + const state = this.serverStates.get(guildId); + if (!state) { + return true; + } + return state.isEnabled; + } + + public getServerConfig(guildId: string): ServerConfig { + const config = this.serverStates.get(guildId); + if (!config) { + const defaultConfig: ServerConfig = { + isEnabled: true, + lastToggled: null, + toggledBy: null + }; + this.serverStates.set(guildId, defaultConfig); + return defaultConfig; + } + return config; + } +} +export { ServerConfigManager }; +export default new ServerConfigManager(); \ No newline at end of file diff --git a/test-server-configs.json b/test-server-configs.json new file mode 100644 index 0000000..c279ad7 --- /dev/null +++ b/test-server-configs.json @@ -0,0 +1,7 @@ +{ + "123456789": { + "isEnabled": false, + "lastToggled": "2024-12-11T17:15:16.960Z", + "toggledBy": "987654321" + } +} \ No newline at end of file From c7adb3efa7b67f48a5f9060eddd125004466e86a Mon Sep 17 00:00:00 2001 From: bryansturdivant <157143446+bryansturdivant@users.noreply.github.com> Date: Sat, 22 Mar 2025 21:57:42 -0400 Subject: [PATCH 02/10] togglebot progress --- package-lock.json | 572 +++++++++++++++++++--------------------- package.json | 2 +- src/discordApp.ts | 3 +- src/interactions.ts | 34 ++- src/registerCommands.ts | 7 +- src/serverSetting.ts | 32 +++ 6 files changed, 352 insertions(+), 298 deletions(-) create mode 100644 src/serverSetting.ts diff --git a/package-lock.json b/package-lock.json index a83fd56..03cc0ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,17 @@ { "name": "vibecheque", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vibecheque", - "version": "0.0.1", + "version": "0.0.2", "license": "CC0-1.0", "dependencies": { "discord.js": "^14.16.3", "dotenv": "^16.4.5", - "firebase": "^11.0.2", + "firebase": "^11.5.0", "openai": "^4.68.1", "tsc-alias": "^1.8.10", "typescript": "^5.6.3" @@ -201,27 +201,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", - "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.25.9", - "@babel/types": "^7.26.0" + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.26.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", - "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.26.0" + "@babel/types": "^7.26.10" }, "bin": { "parser": "bin/babel-parser.js" @@ -470,15 +470,15 @@ } }, "node_modules/@babel/template": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", - "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.25.9", - "@babel/parser": "^7.25.9", - "@babel/types": "^7.25.9" + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" }, "engines": { "node": ">=6.9.0" @@ -504,9 +504,9 @@ } }, "node_modules/@babel/types": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", - "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", "dev": true, "license": "MIT", "dependencies": { @@ -549,32 +549,26 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.9.0.tgz", - "integrity": "sha512-0zx8DePNVvQibh5ly5kCEei5wtPBIUbSoE9n+91Rlladz4tgtFbJ36PZMxxZrTEOQ7AHMZ/b0crT/0fCy6FTKg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.10.1.tgz", + "integrity": "sha512-OWo1fY4ztL1/M/DUyRPShB4d/EzVfuUvPTRRHRIt/YxBrUYSz0a+JicD5F5zHFoNs2oTuWavxCOVFV1UljHTng==", "license": "Apache-2.0", "dependencies": { - "@discordjs/formatters": "^0.5.0", + "@discordjs/formatters": "^0.6.0", "@discordjs/util": "^1.1.1", "@sapphire/shapeshift": "^4.0.0", - "discord-api-types": "0.37.97", + "discord-api-types": "^0.37.119", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.4", "tslib": "^2.6.3" }, "engines": { - "node": ">=18" + "node": ">=16.11.0" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/builders/node_modules/discord-api-types": { - "version": "0.37.97", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", - "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==", - "license": "MIT" - }, "node_modules/@discordjs/collection": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", @@ -585,30 +579,24 @@ } }, "node_modules/@discordjs/formatters": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.5.0.tgz", - "integrity": "sha512-98b3i+Y19RFq1Xke4NkVY46x8KjJQjldHUuEbCqMvp1F5Iq9HgnGpu91jOi/Ufazhty32eRsKnnzS8n4c+L93g==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.6.0.tgz", + "integrity": "sha512-YIruKw4UILt/ivO4uISmrGq2GdMY6EkoTtD0oS0GvkJFRZbTSdPhzYiUILbJ/QslsvC9H9nTgGgnarnIl4jMfw==", "license": "Apache-2.0", "dependencies": { - "discord-api-types": "0.37.97" + "discord-api-types": "^0.37.114" }, "engines": { - "node": ">=18" + "node": ">=16.11.0" }, "funding": { "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/formatters/node_modules/discord-api-types": { - "version": "0.37.97", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", - "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==", - "license": "MIT" - }, "node_modules/@discordjs/rest": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.0.tgz", - "integrity": "sha512-Xb2irDqNcq+O8F0/k/NaDp7+t091p+acb51iA4bCKfIn+WFWd6HrNvcsSbMMxIR9NjcMZS6NReTKygqiQN+ntw==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.3.tgz", + "integrity": "sha512-+SO4RKvWsM+y8uFHgYQrcTl/3+cY02uQOH7/7bKbVZsTfrfpoE62o5p+mmV+s7FVhTX82/kQUGGbu4YlV60RtA==", "license": "Apache-2.0", "dependencies": { "@discordjs/collection": "^2.1.1", @@ -616,10 +604,10 @@ "@sapphire/async-queue": "^1.5.3", "@sapphire/snowflake": "^3.5.3", "@vladfrangu/async_event_emitter": "^2.4.6", - "discord-api-types": "0.37.97", + "discord-api-types": "^0.37.119", "magic-bytes.js": "^1.10.0", "tslib": "^2.6.3", - "undici": "6.19.8" + "undici": "6.21.1" }, "engines": { "node": ">=18" @@ -640,12 +628,6 @@ "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/rest/node_modules/discord-api-types": { - "version": "0.37.97", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", - "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==", - "license": "MIT" - }, "node_modules/@discordjs/util": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz", @@ -659,20 +641,20 @@ } }, "node_modules/@discordjs/ws": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.1.1.tgz", - "integrity": "sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.2.1.tgz", + "integrity": "sha512-PBvenhZG56a6tMWF/f4P6f4GxZKJTBG95n7aiGSPTnodmz4N5g60t79rSIAq7ywMbv8A4jFtexMruH+oe51aQQ==", "license": "Apache-2.0", "dependencies": { "@discordjs/collection": "^2.1.0", - "@discordjs/rest": "^2.3.0", + "@discordjs/rest": "^2.4.3", "@discordjs/util": "^1.1.0", "@sapphire/async-queue": "^1.5.2", "@types/ws": "^8.5.10", "@vladfrangu/async_event_emitter": "^2.2.4", - "discord-api-types": "0.37.83", + "discord-api-types": "^0.37.119", "tslib": "^2.6.2", - "ws": "^8.16.0" + "ws": "^8.17.0" }, "engines": { "node": ">=16.11.0" @@ -693,22 +675,16 @@ "url": "https://github.com/discordjs/discord.js?sponsor" } }, - "node_modules/@discordjs/ws/node_modules/discord-api-types": { - "version": "0.37.83", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.83.tgz", - "integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA==", - "license": "MIT" - }, "node_modules/@firebase/analytics": { - "version": "0.10.10", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.10.tgz", - "integrity": "sha512-Psdo7c9g2SLAYh6u1XRA+RZ7ab2JfBVuAt/kLzXkhKZL/gS2cQUCMsOW5p0RIlDPRKqpdNSmvujd2TeRWLKOkQ==", + "version": "0.10.12", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.12.tgz", + "integrity": "sha512-iDCGnw6qdFqwI5ywkgece99WADJNoymu+nLIQI4fZM/vCZ3bEo4wlpEetW71s1HqGpI0hQStiPhqVjFxDb2yyw==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/installations": "0.6.11", + "@firebase/component": "0.6.13", + "@firebase/installations": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -716,15 +692,15 @@ } }, "node_modules/@firebase/analytics-compat": { - "version": "0.2.16", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.16.tgz", - "integrity": "sha512-Q/s+u/TEMSb2EDJFQMGsOzpSosybBl8HuoSEMyGZ99+0Pu7SIR9MPDGUjc8PKiCFQWDJ3QXxgqh1d/rujyAMbA==", + "version": "0.2.18", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.2.18.tgz", + "integrity": "sha512-Hw9mzsSMZaQu6wrTbi3kYYwGw9nBqOHr47pVLxfr5v8CalsdrG5gfs9XUlPOZjHRVISp3oQrh1j7d3E+ulHPjQ==", "license": "Apache-2.0", "dependencies": { - "@firebase/analytics": "0.10.10", + "@firebase/analytics": "0.10.12", "@firebase/analytics-types": "0.8.3", - "@firebase/component": "0.6.11", - "@firebase/util": "1.10.2", + "@firebase/component": "0.6.13", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -738,14 +714,14 @@ "license": "Apache-2.0" }, "node_modules/@firebase/app": { - "version": "0.10.16", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.10.16.tgz", - "integrity": "sha512-SUati2qH48gvVGnSsqMkZr1Iq7No52a3tJQ4itboSTM89Erezmw3v1RsfVymrDze9+KiOLmBpvLNKSvheITFjg==", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.11.3.tgz", + "integrity": "sha512-QlTZl/RcqPSonYxB87n8KgAUW2L6ZZz0W4D91PVmQ1tJPsKsKPrWAFHL0ii2cQW6FxTxfNjbZ7kucuIcKXk3tw==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "idb": "7.1.1", "tslib": "^2.1.0" }, @@ -754,14 +730,14 @@ } }, "node_modules/@firebase/app-check": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.10.tgz", - "integrity": "sha512-DWFfxxif/t+Ow4MmRUevDX+A3hVxm1rUf6y5ZP4sIomfnVCO1NNahqtsv9rb1/tKGkTeoVT40weiTS/WjQG1mA==", + "version": "0.8.13", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.13.tgz", + "integrity": "sha512-ONsgml8/dplUOAP42JQO6hhiWDEwR9+RUTLenxAN9S8N6gel/sDQ9Ci721Py1oASMGdDU8v9R7xAZxzvOX5lPg==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -772,16 +748,16 @@ } }, "node_modules/@firebase/app-check-compat": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.17.tgz", - "integrity": "sha512-a/eadrGsY0MVCBPhrNbKUhoYpms4UKTYLKO7nswwSFVsm3Rw6NslQQCNLfvljcDqP4E7alQDRGJXjkxd/5gJ+Q==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.20.tgz", + "integrity": "sha512-/twgmlnNAaZ/wbz3kcQrL/26b+X+zUX+lBmu5LwwEcWcpnb+mrVEAKhD7/ttm52dxYiSWtLDeuXy3FXBhqBC5A==", "license": "Apache-2.0", "dependencies": { - "@firebase/app-check": "0.8.10", + "@firebase/app-check": "0.8.13", "@firebase/app-check-types": "0.5.3", - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -804,15 +780,15 @@ "license": "Apache-2.0" }, "node_modules/@firebase/app-compat": { - "version": "0.2.46", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.46.tgz", - "integrity": "sha512-9hSHWE5LMqtKIm13CnH5OZeMPbkVV3y5vgNZ5EMFHcG2ceRrncyNjG9No5XfWQw8JponZdGs4HlE4aMD/jxcFA==", + "version": "0.2.52", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.52.tgz", + "integrity": "sha512-0p/l1KiwhwwYTcPWoleFQHftOnYzeXvyVf3WNZyKFBAoQMpCVW6bVm/uO1bXF91AwU1JN0og888Y6Sc8avqZ+A==", "license": "Apache-2.0", "dependencies": { - "@firebase/app": "0.10.16", - "@firebase/component": "0.6.11", + "@firebase/app": "0.11.3", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -826,14 +802,14 @@ "license": "Apache-2.0" }, "node_modules/@firebase/auth": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.8.1.tgz", - "integrity": "sha512-LX9N/Cf5Z35r5yqm2+5M3+2bRRe/+RFaa/+u4HDni7TA27C/Xm4XHLKcWcLg1BzjrS4zngSaBEOSODvp6RFOqQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.9.1.tgz", + "integrity": "sha512-9KKo5SNVkyJzftsW+daS+PGDbeJ+MFJWXQFHDqqPPH3acWHtiNnGHH5HGpIJErEELrsm9xMPie5zfZ0XpGU8+w==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -850,15 +826,15 @@ } }, "node_modules/@firebase/auth-compat": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.16.tgz", - "integrity": "sha512-YlYwJMBqAyv0ESy3jDUyshMhZlbUiwAm6B6+uUmigNDHU+uq7j4SFiDJEZlFFIz397yBzKn06SUdqutdQzGnCA==", + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.19.tgz", + "integrity": "sha512-v898POphOIBJliKF76SiGOXh4EdhO5fM6S9a2ZKf/8wHdBea/qwxwZoVVya4DW6Mi7vWyp1lIzHbFgwRz8G9TA==", "license": "Apache-2.0", "dependencies": { - "@firebase/auth": "1.8.1", - "@firebase/auth-types": "0.12.3", - "@firebase/component": "0.6.11", - "@firebase/util": "1.10.2", + "@firebase/auth": "1.9.1", + "@firebase/auth-types": "0.13.0", + "@firebase/component": "0.6.13", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -875,9 +851,9 @@ "license": "Apache-2.0" }, "node_modules/@firebase/auth-types": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.12.3.tgz", - "integrity": "sha512-Zq9zI0o5hqXDtKg6yDkSnvMCMuLU6qAVS51PANQx+ZZX5xnzyNLEBO3GZgBUPsV5qIMFhjhqmLDxUqCbnAYy2A==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@firebase/auth-types/-/auth-types-0.13.0.tgz", + "integrity": "sha512-S/PuIjni0AQRLF+l9ck0YpsMOdE8GO2KU6ubmBB7P+7TJUCQDa3R1dlgYm9UzGbbePMZsp0xzB93f2b/CgxMOg==", "license": "Apache-2.0", "peerDependencies": { "@firebase/app-types": "0.x", @@ -885,12 +861,12 @@ } }, "node_modules/@firebase/component": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.11.tgz", - "integrity": "sha512-eQbeCgPukLgsKD0Kw5wQgsMDX5LeoI1MIrziNDjmc6XDq5ZQnuUymANQgAb2wp1tSF9zDSXyxJmIUXaKgN58Ug==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.6.13.tgz", + "integrity": "sha512-I/Eg1NpAtZ8AAfq8mpdfXnuUpcLxIDdCDtTzWSh+FXnp/9eCKJ3SNbOCKrUCyhLzNa2SiPJYruei0sxVjaOTeg==", "license": "Apache-2.0", "dependencies": { - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -898,15 +874,15 @@ } }, "node_modules/@firebase/data-connect": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.1.2.tgz", - "integrity": "sha512-Bcf29mntFCt5V7aceMe36wnkHrG7cwbMlUVbDHOlh2foQKx9VtSXEONw9r6FtL1sFobHVYOM5L6umX35f59m5g==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.2.tgz", + "integrity": "sha512-PYG55JRTmvYrUuXXmYBsZexwKVP9aR3mIRRHxB9V2bQeRDZky6JtRZnH3GLhf4ZsxZy5Ewd8ul/jTOYR4gpD9w==", "license": "Apache-2.0", "dependencies": { "@firebase/auth-interop-types": "0.2.4", - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -914,16 +890,16 @@ } }, "node_modules/@firebase/database": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.10.tgz", - "integrity": "sha512-sWp2g92u7xT4BojGbTXZ80iaSIaL6GAL0pwvM0CO/hb0nHSnABAqsH7AhnWGsGvXuEvbPr7blZylPaR9J+GSuQ==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.14.tgz", + "integrity": "sha512-9nxYtkHAG02/Nh2Ssms1T4BbWPPjiwohCvkHDUl4hNxnki1kPgsLo5xe9kXNzbacOStmVys+RUXvwzynQSKmUQ==", "license": "Apache-2.0", "dependencies": { "@firebase/app-check-interop-types": "0.3.3", "@firebase/auth-interop-types": "0.2.4", - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "faye-websocket": "0.11.4", "tslib": "^2.1.0" }, @@ -932,16 +908,16 @@ } }, "node_modules/@firebase/database-compat": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.0.1.tgz", - "integrity": "sha512-IsFivOjdE1GrjTeKoBU/ZMenESKDXidFDzZzHBPQ/4P20ptGdrl3oLlWrV/QJqJ9lND4IidE3z4Xr5JyfUW1vg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.0.5.tgz", + "integrity": "sha512-CNf1UbvWh6qIaSf4sn6sx2DTDz/em/D7QxULH1LTxxDQHr9+CeYGvlAqrKnk4ZH0P0eIHyQFQU7RwkUJI0B9gQ==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/database": "1.0.10", - "@firebase/database-types": "1.0.7", + "@firebase/component": "0.6.13", + "@firebase/database": "1.0.14", + "@firebase/database-types": "1.0.10", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -949,24 +925,24 @@ } }, "node_modules/@firebase/database-types": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.7.tgz", - "integrity": "sha512-I7zcLfJXrM0WM+ksFmFdAMdlq/DFmpeMNa+/GNsLyFo5u/lX5zzkPzGe3srVWqaBQBY5KprylDGxOsP6ETfL0A==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.10.tgz", + "integrity": "sha512-mH6RC1E9/Pv8jf1/p+M8YFTX+iu+iHDN89hecvyO7wHrI4R1V0TXjxOHvX3nLJN1sfh0CWG6CHZ0VlrSmK/cwg==", "license": "Apache-2.0", "dependencies": { "@firebase/app-types": "0.9.3", - "@firebase/util": "1.10.2" + "@firebase/util": "1.11.0" } }, "node_modules/@firebase/firestore": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.5.tgz", - "integrity": "sha512-OO3rHvjC07jL2ITN255xH/UzCVSvh6xG8oTzQdFScQvFbcm1fjCL1hgAdpDZcx3vVcKMV+6ktr8wbllkB8r+FQ==", + "version": "4.7.10", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.10.tgz", + "integrity": "sha512-6nKsyo2U+jYSCcSE5sjMdDNA23DMUvYPUvsYGg09CNvcTO8GGKsPs7SpOhspsB91mbacq+u627CDAx3FUhPSSQ==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "@firebase/webchannel-wrapper": "1.0.3", "@grpc/grpc-js": "~1.9.0", "@grpc/proto-loader": "^0.7.8", @@ -980,15 +956,15 @@ } }, "node_modules/@firebase/firestore-compat": { - "version": "0.3.40", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.40.tgz", - "integrity": "sha512-18HopMN811KYBc9Ptpr1Rewwio0XF09FF3jc5wtV6rGyAs815SlFFw5vW7ZeLd43zv9tlEc2FzM0H+5Vr9ZRxw==", + "version": "0.3.45", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.45.tgz", + "integrity": "sha512-uRvi7AYPmsDl7UZwPyV7jgDGYusEZ2+U2g7MndbQHKIA8fNHpYC6QrzMs58+/IjX+kF/lkUn67Vrr0AkVjlY+Q==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/firestore": "4.7.5", + "@firebase/component": "0.6.13", + "@firebase/firestore": "4.7.10", "@firebase/firestore-types": "3.0.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -1009,16 +985,16 @@ } }, "node_modules/@firebase/functions": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.10.tgz", - "integrity": "sha512-TP+Dzebazhw6+GduBdWn1kOJRFH84G2z+BW3pNVfkpFRkc//+uT1Uw2+dLpMGSSBRG7FrcDG91vcPnOFCzr15w==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.12.3.tgz", + "integrity": "sha512-Wv7JZMUkKLb1goOWRtsu3t7m97uK6XQvjQLPvn8rncY91+VgdU72crqnaYCDI/ophNuBEmuK8mn0/pAnjUeA6A==", "license": "Apache-2.0", "dependencies": { "@firebase/app-check-interop-types": "0.3.3", "@firebase/auth-interop-types": "0.2.4", - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/messaging-interop-types": "0.2.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -1029,15 +1005,15 @@ } }, "node_modules/@firebase/functions-compat": { - "version": "0.3.16", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.16.tgz", - "integrity": "sha512-FL7EXehiiBisNIR7mlb0i+moyWKLVfcEJgh/Wq6ZV6BdrCObpCTz7w5EvuRIEFX5e9cNL2oWInKg8S5X4HtINg==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.20.tgz", + "integrity": "sha512-iIudmYDAML6n3c7uXO2YTlzra2/J6lnMzmJTXNthvrKVMgNMaseNoQP1wKfchK84hMuSF8EkM4AvufwbJ+Juew==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/functions": "0.11.10", + "@firebase/component": "0.6.13", + "@firebase/functions": "0.12.3", "@firebase/functions-types": "0.6.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -1054,13 +1030,13 @@ "license": "Apache-2.0" }, "node_modules/@firebase/installations": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.11.tgz", - "integrity": "sha512-w8fY8mw6fxJzsZM2ufmTtomopXl1+bn/syYon+Gpn+0p0nO1cIUEVEFrFazTLaaL9q1CaVhc3HmseRTsI3igAA==", + "version": "0.6.13", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.6.13.tgz", + "integrity": "sha512-6ZpkUiaygPFwgVneYxuuOuHnSPnTA4KefLEaw/sKk/rNYgC7X6twaGfYb0sYLpbi9xV4i5jXsqZ3WO+yaguNgg==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/util": "1.10.2", + "@firebase/component": "0.6.13", + "@firebase/util": "1.11.0", "idb": "7.1.1", "tslib": "^2.1.0" }, @@ -1069,15 +1045,15 @@ } }, "node_modules/@firebase/installations-compat": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.11.tgz", - "integrity": "sha512-SHRgw5LTa6v8LubmJZxcOCwEd1MfWQPUtKdiuCx2VMWnapX54skZd1PkQg0K4l3k+4ujbI2cn7FE6Li9hbChBw==", + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/@firebase/installations-compat/-/installations-compat-0.2.13.tgz", + "integrity": "sha512-f/o6MqCI7LD/ulY9gvgkv6w5k6diaReD8BFHd/y/fEdpsXmFWYS/g28GXCB72bRVBOgPpkOUNl+VsMvDwlRKmw==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/installations": "0.6.11", + "@firebase/component": "0.6.13", + "@firebase/installations": "0.6.13", "@firebase/installations-types": "0.5.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -1106,15 +1082,15 @@ } }, "node_modules/@firebase/messaging": { - "version": "0.12.14", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.14.tgz", - "integrity": "sha512-cSGP34jJswFvME8tdMDkvJvW6T1jEekyMSyq84AMBZ0KEpJbDWuC9n4wKT2lxUm1jaL651iZnn6g51yCl77ICg==", + "version": "0.12.17", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.17.tgz", + "integrity": "sha512-W3CnGhTm6Nx8XGb6E5/+jZTuxX/EK8Vur4QXvO1DwZta/t0xqWMRgO9vNsZFMYBqFV4o3j4F9qK/iddGYwWS6g==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/installations": "0.6.11", + "@firebase/component": "0.6.13", + "@firebase/installations": "0.6.13", "@firebase/messaging-interop-types": "0.2.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "idb": "7.1.1", "tslib": "^2.1.0" }, @@ -1123,14 +1099,14 @@ } }, "node_modules/@firebase/messaging-compat": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.14.tgz", - "integrity": "sha512-r9weK8jTEA2aGiwy0IbMQPnzuJ0DHkOQaMxGJOlU2QZ1a7fh6RHpNtaoM+LKnn6u1NQgmAOWYNr9vezVQEm9zw==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.17.tgz", + "integrity": "sha512-5Q+9IG7FuedusdWHVQRjpA3OVD9KUWp/IPegcv0s5qSqRLBjib7FlAeWxN+VL0Ew43tuPJBY2HKhEecuizmO1Q==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/messaging": "0.12.14", - "@firebase/util": "1.10.2", + "@firebase/component": "0.6.13", + "@firebase/messaging": "0.12.17", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -1144,32 +1120,33 @@ "license": "Apache-2.0" }, "node_modules/@firebase/performance": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.11.tgz", - "integrity": "sha512-FlkJFeqLlIeh5T4Am3uE38HVzggliDIEFy/fErEc1faINOUFCb6vQBEoNZGaXvRnTR8lh3X/hP7tv37C7BsK9g==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.7.2.tgz", + "integrity": "sha512-DXLLp0R0jdxH/yTmv+WTkOzsLl8YYecXh4lGZE0dzqC0IV8k+AxpLSSWvOTCkAETze8yEU/iF+PtgYVlGjfMMQ==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/installations": "0.6.11", + "@firebase/component": "0.6.13", + "@firebase/installations": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", - "tslib": "^2.1.0" + "@firebase/util": "1.11.0", + "tslib": "^2.1.0", + "web-vitals": "^4.2.4" }, "peerDependencies": { "@firebase/app": "0.x" } }, "node_modules/@firebase/performance-compat": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.11.tgz", - "integrity": "sha512-DqeNBy51W2xzlklyC7Ht9JQ94HhTA08PCcM4MDeyG/ol3fqum/+YgtHWQ2IQuduqH9afETthZqLwCZiSgY7hiA==", + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.15.tgz", + "integrity": "sha512-wUxsw7hGBEMN6XfvYQqwPIQp5LcJXawWM5tmYp6L7ClCoTQuEiCKHWWVurJgN8Q1YHzoHVgjNfPQAOVu29iMVg==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/performance": "0.6.11", + "@firebase/performance": "0.7.2", "@firebase/performance-types": "0.2.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -1183,15 +1160,15 @@ "license": "Apache-2.0" }, "node_modules/@firebase/remote-config": { - "version": "0.4.11", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.4.11.tgz", - "integrity": "sha512-9z0rgKuws2nj+7cdiqF+NY1QR4na6KnuOvP+jQvgilDOhGtKOcCMq5XHiu66i73A9kFhyU6QQ2pHXxcmaq1pBw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.6.0.tgz", + "integrity": "sha512-Yrk4l5+6FJLPHC6irNHMzgTtJ3NfHXlAXVChCBdNFtgmzyGmufNs/sr8oA0auEfIJ5VpXCaThRh3P4OdQxiAlQ==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/installations": "0.6.11", + "@firebase/component": "0.6.13", + "@firebase/installations": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -1199,16 +1176,16 @@ } }, "node_modules/@firebase/remote-config-compat": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.11.tgz", - "integrity": "sha512-zfIjpwPrGuIOZDmduukN086qjhZ1LnbJi/iYzgua+2qeTlO0XdlE1v66gJPwygGB3TOhT0yb9EiUZ3nBNttMqg==", + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.2.13.tgz", + "integrity": "sha512-UmHoO7TxAEJPIZf8e1Hy6CeFGMeyjqSCpgoBkQZYXFI2JHhzxIyDpr8jVKJJN1dmAePKZ5EX7dC13CmcdTOl7Q==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/remote-config": "0.4.11", - "@firebase/remote-config-types": "0.3.3", - "@firebase/util": "1.10.2", + "@firebase/remote-config": "0.6.0", + "@firebase/remote-config-types": "0.4.0", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "peerDependencies": { @@ -1216,19 +1193,19 @@ } }, "node_modules/@firebase/remote-config-types": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.3.3.tgz", - "integrity": "sha512-YlRI9CHxrk3lpQuFup9N1eohpwdWayKZUNZ/YeQ0PZoncJ66P32UsKUKqVXOaieTjJIOh7yH8JEzRdht5s+d6g==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-types/-/remote-config-types-0.4.0.tgz", + "integrity": "sha512-7p3mRE/ldCNYt8fmWMQ/MSGRmXYlJ15Rvs9Rk17t8p0WwZDbeK7eRmoI1tvCPaDzn9Oqh+yD6Lw+sGLsLg4kKg==", "license": "Apache-2.0" }, "node_modules/@firebase/storage": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.13.4.tgz", - "integrity": "sha512-b1KaTTRiMupFurIhpGIbReaWev0k5O3ouTHkAPcEssT+FvU3q/1JwzvkX4+ZdB60Fc43Mbp8qQ1gWfT0Z2FP9Q==", + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.13.7.tgz", + "integrity": "sha512-FkRyc24rK+Y6EaQ1tYFm3TevBnnfSNA0VyTfew2hrYyL/aYfatBg7HOgktUdB4kWMHNA9VoTotzZTGoLuK92wg==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/util": "1.10.2", + "@firebase/component": "0.6.13", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -1239,15 +1216,15 @@ } }, "node_modules/@firebase/storage-compat": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.14.tgz", - "integrity": "sha512-Ok5FmXJiapaNAOQ8W8qppnfwgP8540jw2B8M0c4TFZqF4BD+CoKBxW0dRtOuLNGadLhzqqkDZZZtkexxrveQqA==", + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.17.tgz", + "integrity": "sha512-CBlODWEZ5b6MJWVh21VZioxwxNwVfPA9CAdsk+ZgVocJQQbE2oDW1XJoRcgthRY1HOitgbn4cVrM+NlQtuUYhw==", "license": "Apache-2.0", "dependencies": { - "@firebase/component": "0.6.11", - "@firebase/storage": "0.13.4", + "@firebase/component": "0.6.13", + "@firebase/storage": "0.13.7", "@firebase/storage-types": "0.8.3", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -1268,9 +1245,10 @@ } }, "node_modules/@firebase/util": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.10.2.tgz", - "integrity": "sha512-qnSHIoE9FK+HYnNhTI8q14evyqbc/vHRivfB4TgCIUOl4tosmKSQlp7ltymOlMP4xVIJTg5wrkfcZ60X4nUf7Q==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.11.0.tgz", + "integrity": "sha512-PzSrhIr++KI6y4P6C/IdgBNMkEx0Ex6554/cYd0Hm+ovyFSJtJXqb/3OSIdnBoa2cpwZT1/GW56EmRc5qEc5fQ==", + "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" @@ -1280,15 +1258,15 @@ } }, "node_modules/@firebase/vertexai": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@firebase/vertexai/-/vertexai-1.0.1.tgz", - "integrity": "sha512-f48MGSofhaS05ebpN7zMIv4tBqYf19pXr5/4njKtNZVLbjxUswDma0SuFDoO+IwgbdkhFxgtNctM+C1zfI/O1Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@firebase/vertexai/-/vertexai-1.2.0.tgz", + "integrity": "sha512-WUYIzFpOipjFXT2i0hT26wivJoIximizQptVs3KAxFAqbVlO8sjKPsMkgz0bh+tdKlqP4SUDda71fMUZXUKHgA==", "license": "Apache-2.0", "dependencies": { "@firebase/app-check-interop-types": "0.3.3", - "@firebase/component": "0.6.11", + "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", - "@firebase/util": "1.10.2", + "@firebase/util": "1.11.0", "tslib": "^2.1.0" }, "engines": { @@ -1808,9 +1786,9 @@ "license": "BSD-3-Clause" }, "node_modules/@sapphire/async-queue": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.3.tgz", - "integrity": "sha512-x7zadcfJGxFka1Q3f8gCts1F0xMwCKbZweM85xECGI0hBTeIZJGGCrHgLggihBoprlQ/hBmDR5LKfIPqnmHM3w==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.5.tgz", + "integrity": "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg==", "license": "MIT", "engines": { "node": ">=v14.0.0", @@ -2015,9 +1993,9 @@ "license": "MIT" }, "node_modules/@types/ws": { - "version": "8.5.12", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", - "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8svvI3hMyvN0kKCJMvTJP/x6Y/EoQbepff882wL+Sn5QsXb3etnamgrJq4isrBxSJj5L2AuXcI0+bgkoAXGUJw==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -2752,29 +2730,29 @@ } }, "node_modules/discord-api-types": { - "version": "0.37.100", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.100.tgz", - "integrity": "sha512-a8zvUI0GYYwDtScfRd/TtaNBDTXwP5DiDVX7K5OmE+DRT57gBqKnwtOC5Ol8z0mRW8KQfETIgiB8U0YZ9NXiCA==", + "version": "0.37.119", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.119.tgz", + "integrity": "sha512-WasbGFXEB+VQWXlo6IpW3oUv73Yuau1Ig4AZF/m13tXcTKnMpc/mHjpztIlz4+BM9FG9BHQkEXiPto3bKduQUg==", "license": "MIT" }, "node_modules/discord.js": { - "version": "14.16.3", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.16.3.tgz", - "integrity": "sha512-EPCWE9OkA9DnFFNrO7Kl1WHHDYFXu3CNVFJg63bfU7hVtjZGyhShwZtSBImINQRWxWP2tgo2XI+QhdXx28r0aA==", + "version": "14.18.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.18.0.tgz", + "integrity": "sha512-SvU5kVUvwunQhN2/+0t55QW/1EHfB1lp0TtLZUSXVHDmyHTrdOj5LRKdR0zLcybaA15F+NtdWuWmGOX9lE+CAw==", "license": "Apache-2.0", "dependencies": { - "@discordjs/builders": "^1.9.0", + "@discordjs/builders": "^1.10.1", "@discordjs/collection": "1.5.3", - "@discordjs/formatters": "^0.5.0", - "@discordjs/rest": "^2.4.0", + "@discordjs/formatters": "^0.6.0", + "@discordjs/rest": "^2.4.3", "@discordjs/util": "^1.1.1", - "@discordjs/ws": "1.1.1", + "@discordjs/ws": "^1.2.1", "@sapphire/snowflake": "3.5.3", - "discord-api-types": "0.37.100", + "discord-api-types": "^0.37.119", "fast-deep-equal": "3.1.3", "lodash.snakecase": "4.1.1", "tslib": "^2.6.3", - "undici": "6.19.8" + "undici": "6.21.1" }, "engines": { "node": ">=18" @@ -3059,39 +3037,39 @@ } }, "node_modules/firebase": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.0.2.tgz", - "integrity": "sha512-w4T8BSJpzdZA25QRch5ahLsgB6uRvg1LEic4BaC5rTD1YygroI1AXp+W+rbMnr8d8EjfAv6t4k8doULIjc1P8Q==", + "version": "11.5.0", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.5.0.tgz", + "integrity": "sha512-ZTpO/zD5nYqY02bGpXCg1dRNLggTXPQZdLQeSeur3jYH270p1QkAZZJsm/lrKZ2W4ZjBlafTxxs4OwN38Vyocw==", "license": "Apache-2.0", "dependencies": { - "@firebase/analytics": "0.10.10", - "@firebase/analytics-compat": "0.2.16", - "@firebase/app": "0.10.16", - "@firebase/app-check": "0.8.10", - "@firebase/app-check-compat": "0.3.17", - "@firebase/app-compat": "0.2.46", + "@firebase/analytics": "0.10.12", + "@firebase/analytics-compat": "0.2.18", + "@firebase/app": "0.11.3", + "@firebase/app-check": "0.8.13", + "@firebase/app-check-compat": "0.3.20", + "@firebase/app-compat": "0.2.52", "@firebase/app-types": "0.9.3", - "@firebase/auth": "1.8.1", - "@firebase/auth-compat": "0.5.16", - "@firebase/data-connect": "0.1.2", - "@firebase/database": "1.0.10", - "@firebase/database-compat": "2.0.1", - "@firebase/firestore": "4.7.5", - "@firebase/firestore-compat": "0.3.40", - "@firebase/functions": "0.11.10", - "@firebase/functions-compat": "0.3.16", - "@firebase/installations": "0.6.11", - "@firebase/installations-compat": "0.2.11", - "@firebase/messaging": "0.12.14", - "@firebase/messaging-compat": "0.2.14", - "@firebase/performance": "0.6.11", - "@firebase/performance-compat": "0.2.11", - "@firebase/remote-config": "0.4.11", - "@firebase/remote-config-compat": "0.2.11", - "@firebase/storage": "0.13.4", - "@firebase/storage-compat": "0.3.14", - "@firebase/util": "1.10.2", - "@firebase/vertexai": "1.0.1" + "@firebase/auth": "1.9.1", + "@firebase/auth-compat": "0.5.19", + "@firebase/data-connect": "0.3.2", + "@firebase/database": "1.0.14", + "@firebase/database-compat": "2.0.5", + "@firebase/firestore": "4.7.10", + "@firebase/firestore-compat": "0.3.45", + "@firebase/functions": "0.12.3", + "@firebase/functions-compat": "0.3.20", + "@firebase/installations": "0.6.13", + "@firebase/installations-compat": "0.2.13", + "@firebase/messaging": "0.12.17", + "@firebase/messaging-compat": "0.2.17", + "@firebase/performance": "0.7.2", + "@firebase/performance-compat": "0.2.15", + "@firebase/remote-config": "0.6.0", + "@firebase/remote-config-compat": "0.2.13", + "@firebase/storage": "0.13.7", + "@firebase/storage-compat": "0.3.17", + "@firebase/util": "1.11.0", + "@firebase/vertexai": "1.2.0" } }, "node_modules/form-data": { @@ -3302,9 +3280,9 @@ "license": "MIT" }, "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.9.tgz", + "integrity": "sha512-n1XsPy3rXVxlqxVioEWdC+0+M+SQw0DpJynwtOPo1X+ZlvdzTLtDBIJJlDQTnwZIFJrZSzSGmIOUdP8tu+SgLw==", "license": "MIT" }, "node_modules/human-signals": { @@ -4313,9 +4291,9 @@ "license": "MIT" }, "node_modules/long": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", - "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", + "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==", "license": "Apache-2.0" }, "node_modules/lru-cache": { @@ -5447,9 +5425,9 @@ } }, "node_modules/undici": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", - "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", + "version": "6.21.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz", + "integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==", "license": "MIT", "engines": { "node": ">=18.17" @@ -5533,6 +5511,12 @@ "node": ">= 14" } }, + "node_modules/web-vitals": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.2.4.tgz", + "integrity": "sha512-r4DIlprAGwJ7YM11VZp4R884m0Vmgr6EAKe3P+kO0PPj3Unqyvv59rczf6UiGcb9Z8QxZVcqKNwv/g0WNdWwsw==", + "license": "Apache-2.0" + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -5627,9 +5611,9 @@ } }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-RKW2aJZMXeMxVpnZ6bck+RswznaxmzdULiBr6KY7XkTnW8uvt0iT9H5DkHUChXrc+uurzwa0rVI16n/Xzjdz1w==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index 123f3be..5d96a61 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dependencies": { "discord.js": "^14.16.3", "dotenv": "^16.4.5", - "firebase": "^11.0.2", + "firebase": "^11.5.0", "openai": "^4.68.1", "tsc-alias": "^1.8.10", "typescript": "^5.6.3" diff --git a/src/discordApp.ts b/src/discordApp.ts index d12f30c..bb805e4 100644 --- a/src/discordApp.ts +++ b/src/discordApp.ts @@ -1,6 +1,6 @@ import "dotenv/config"; import { Client, GatewayIntentBits, Events } from "discord.js"; -import { clarify, embed, ping, tone, requestAnonymousClarification, mood } from "./interactions" +import { clarify, embed, ping, tone, requestAnonymousClarification, mood, toggleBot } from "./interactions" export async function launchBot(): Promise { // the client has to declare the features it uses up front so discord.js kno9ws if it can @@ -49,6 +49,7 @@ export async function launchBot(): Promise { if (interaction.commandName === "ping") await ping(interaction); if (interaction.commandName === "embed") await embed(interaction); if (interaction.commandName === "mood") await mood(interaction); + if (interaction.commandName === "togglebot") await toggleBot(interaction); } else if (interaction.isMessageContextMenuCommand()) { // command from the "apps" menu when clicking on a message if (interaction.commandName === "Tone") await tone(interaction); if (interaction.commandName === "Clarify") await clarify(interaction); diff --git a/src/interactions.ts b/src/interactions.ts index 0868ea9..4aa7107 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -7,7 +7,8 @@ import { import { analyzeTone, analyzeMoodColor } from "./gptRequests"; import db from './firebase'; // Import from your firebase.ts file import { ref, set, get, child } from "firebase/database"; -import { updateOldRoleInServer, updateNewRoleInServer} from "./helpers" +import { updateOldRoleInServer, updateNewRoleInServer} from "./helpers"; +import { getServerSetting, toggleServerSetting } from "./serverSetting"; /** * the callback to a `ping` interaction @@ -213,4 +214,35 @@ export async function requestAnonymousClarification(interaction: MessageContextM content: "There was an error handling the clarification request", }); } +} + +export async function toggleBot(interaction: command) { + await interaction.deferReply({ ephemeral: true }); + + const guildId = interaction.guildId!; // Get the guild ID + const dbRef = ref(db, `servers/${guildId}/botStatus`); + + try { + // Get the current bot status from the Realtime Database + const snapshot = await get(dbRef); + let newStatus = "active"; // Default to 'active' + + if (snapshot.exists() && snapshot.val() === "active") { + newStatus = "inactive"; // If active, set to inactive + } + + // Update the bot status in the Realtime Database + await set(dbRef, newStatus); + + // Respond with a confirmation message + interaction.editReply({ + content: `The bot has been turned ${newStatus === "active" ? "on" : "off"} for this server.`, + }); + + } catch (error) { + console.error("Error toggling bot status:", error); + interaction.editReply({ + content: "There was an error while toggling the bot's status. Please try again later.", + }); + } } \ No newline at end of file diff --git a/src/registerCommands.ts b/src/registerCommands.ts index 9ff9b2a..6e4b5ac 100644 --- a/src/registerCommands.ts +++ b/src/registerCommands.ts @@ -1,5 +1,5 @@ import "dotenv/config"; -import { REST, Routes, ApplicationCommandOptionType } from "discord.js"; +import { REST, Routes, ApplicationCommandOptionType, SlashCommandBuilder } from "discord.js"; // define a ts type for discord commands declare type command = { @@ -79,5 +79,10 @@ updateCommands([ { name:"Request Anonymous Clarification", type: 3, + }, + { + name: "togglebot", + description: "Enable or Disable VibeCheque for this server", + type: 1, } ]); \ No newline at end of file diff --git a/src/serverSetting.ts b/src/serverSetting.ts new file mode 100644 index 0000000..b3bedaa --- /dev/null +++ b/src/serverSetting.ts @@ -0,0 +1,32 @@ +import { get, ref, set } from "firebase/database"; +import database from "./firebase"; // Import the Realtime Database instance + +// Get the current setting for the server (whether the bot is enabled or disabled) +export async function getServerSetting(guildId: string): Promise { + const dbRef = ref(database, `servers/${guildId}/botStatus`); + + try { + const snapshot = await get(dbRef); + if (snapshot.exists()) { + return snapshot.val() === "active"; // Check if the bot is "active" + } else { + // Default to "active" if no setting is found + await set(dbRef, "active"); + return true; + } + } catch (error) { + console.error("Error getting server setting:", error); + throw error; + } +} + +// Toggle the bot's enabled/disabled setting for the server +export async function toggleServerSetting(guildId: string): Promise { + const currentSetting = await getServerSetting(guildId); + const newSetting = currentSetting ? "inactive" : "active"; // Switch between "active" and "inactive" + + const dbRef = ref(database, `servers/${guildId}/botStatus`); + await set(dbRef, newSetting); + + return newSetting === "active"; +} \ No newline at end of file From 215e710a80df1962275d8589ed06516b691c7631 Mon Sep 17 00:00:00 2001 From: bryansturdivant <157143446+bryansturdivant@users.noreply.github.com> Date: Sat, 22 Mar 2025 22:01:35 -0400 Subject: [PATCH 03/10] more progress --- src/interactions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interactions.ts b/src/interactions.ts index 4aa7107..0ee1393 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -216,7 +216,7 @@ export async function requestAnonymousClarification(interaction: MessageContextM } } -export async function toggleBot(interaction: command) { +export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply({ ephemeral: true }); const guildId = interaction.guildId!; // Get the guild ID From d0c72c26ceed381ae7b79d2b76084cfac84afdc1 Mon Sep 17 00:00:00 2001 From: bryansturdivant <157143446+bryansturdivant@users.noreply.github.com> Date: Sat, 22 Mar 2025 22:32:07 -0400 Subject: [PATCH 04/10] need to figure out why bot is starting disabled --- src/discordApp.ts | 56 +++++++++++++++++++++++++++++++++++---------- src/interactions.ts | 4 +++- 2 files changed, 47 insertions(+), 13 deletions(-) diff --git a/src/discordApp.ts b/src/discordApp.ts index bb805e4..791dc66 100644 --- a/src/discordApp.ts +++ b/src/discordApp.ts @@ -1,6 +1,9 @@ import "dotenv/config"; import { Client, GatewayIntentBits, Events } from "discord.js"; import { clarify, embed, ping, tone, requestAnonymousClarification, mood, toggleBot } from "./interactions" +import {ref, get} from "firebase/database"; +import database from "./firebase"; +import { CommandInteraction } from "discord.js"; export async function launchBot(): Promise { // the client has to declare the features it uses up front so discord.js kno9ws if it can @@ -44,19 +47,48 @@ export async function launchBot(): Promise { // called when an interaction (e.g. slash command) is called. there are a bunch of different // interaction types, but we'll see which we need as time goes on. // TODO: find references for this + // Called when an interaction (e.g., slash command) is triggered client.on(Events.InteractionCreate, async (interaction) => { - if (interaction.isChatInputCommand()) { // slash command - if (interaction.commandName === "ping") await ping(interaction); - if (interaction.commandName === "embed") await embed(interaction); - if (interaction.commandName === "mood") await mood(interaction); - if (interaction.commandName === "togglebot") await toggleBot(interaction); - } else if (interaction.isMessageContextMenuCommand()) { // command from the "apps" menu when clicking on a message - if (interaction.commandName === "Tone") await tone(interaction); - if (interaction.commandName === "Clarify") await clarify(interaction); - if (interaction.commandName === "Request Anonymous Clarification") await requestAnonymousClarification(interaction); - } else { - console.log(interaction); - } + const guildId = interaction.guildId!; + const dbRef = ref(database, `servers/${guildId}/botStatus`); + + try { + // Fetch the bot status from the database + const snapshot = await get(dbRef); + const botStatus = snapshot.exists() ? snapshot.val() : "active"; // Default to 'active' if not set + + // If the bot is inactive, ignore the interaction and reply with a message + if (botStatus === "inactive") { + + if(interaction.isCommand()){ + return interaction.reply({ + content: "Sorry, the bot is currently disabled for this server.", + flags: 64, // Make it ephemeral + }); + } + } + + // If the bot is active, process the interaction + if (interaction.isChatInputCommand()) { // Slash command + if (interaction.commandName === "ping") await ping(interaction); + if (interaction.commandName === "embed") await embed(interaction); + if (interaction.commandName === "mood") await mood(interaction); + if (interaction.commandName === "togglebot") await toggleBot(interaction); + } else if (interaction.isMessageContextMenuCommand()) { // Command from the "apps" menu when clicking on a message + if (interaction.commandName === "Tone") await tone(interaction); + if (interaction.commandName === "Clarify") await clarify(interaction); + if (interaction.commandName === "Request Anonymous Clarification") await requestAnonymousClarification(interaction); + } else { + console.log(interaction); + } + } catch (error) { + console.error("Error fetching bot status:", error); + if(interaction.isCommand()){ + interaction.reply({ + content: "There was an error while processing your request. Please try again later.", + flags: 64, + }); + }} }); // attempt to connect diff --git a/src/interactions.ts b/src/interactions.ts index 0ee1393..070e36b 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -217,7 +217,7 @@ export async function requestAnonymousClarification(interaction: MessageContextM } export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { - await interaction.deferReply({ ephemeral: true }); + await interaction.deferReply({ flags:64}); const guildId = interaction.guildId!; // Get the guild ID const dbRef = ref(db, `servers/${guildId}/botStatus`); @@ -229,6 +229,8 @@ export async function toggleBot(interaction: ChatInputCommandInteraction Date: Sat, 22 Mar 2025 22:58:51 -0400 Subject: [PATCH 05/10] currently works - just need server to be set to active --- src/discordApp.ts | 10 ++++---- src/interactions.ts | 61 +++++++++++++++++++++++++++++++++++++++++--- src/serverSetting.ts | 10 ++++---- 3 files changed, 67 insertions(+), 14 deletions(-) diff --git a/src/discordApp.ts b/src/discordApp.ts index 791dc66..a846513 100644 --- a/src/discordApp.ts +++ b/src/discordApp.ts @@ -59,11 +59,11 @@ export async function launchBot(): Promise { // If the bot is inactive, ignore the interaction and reply with a message if (botStatus === "inactive") { - - if(interaction.isCommand()){ - return interaction.reply({ - content: "Sorry, the bot is currently disabled for this server.", - flags: 64, // Make it ephemeral + + if(interaction.isCommand() && interaction.commandName != "togglebot"){ + return interaction.reply({ + content: "Sorry, the bot is currently disabled for this server.", + flags: 64, // Make it ephemeral }); } } diff --git a/src/interactions.ts b/src/interactions.ts index 070e36b..48daa6c 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -215,7 +215,6 @@ export async function requestAnonymousClarification(interaction: MessageContextM }); } } - export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply({ flags:64}); @@ -229,10 +228,13 @@ export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { +// await interaction.deferReply({ flags: 64 }); // Defer the reply to allow time for the operation + +// const guildId = interaction.guildId!; // Get the guild ID + +// try { +// // Use the helper functions to get and toggle the bot status +// const newStatus = await toggleServerSetting(guildId); // Toggle the bot status + +// // Respond with a confirmation message +// interaction.editReply({ +// content: `The bot has been turned ${newStatus === "active" ? "on" : "off"} for this server.`, +// }); +// } catch (error) { +// console.error("Error toggling bot status:", error); +// interaction.editReply({ +// content: "There was an error while toggling the bot's status. Please try again later.", +// }); +// } +// } +// export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { +// await interaction.deferReply({ flags:64}); + +// const guildId = interaction.guildId!; // Get the guild ID +// const dbRef = ref(db, `servers/${guildId}/botStatus`); + +// try { +// // Get the current bot status from the Realtime Database +// const snapshot = await get(dbRef); +// let newStatus = "active"; // Default to 'active' + +// if (snapshot.exists() && snapshot.val() === "active") { +// newStatus = "inactive"; // If active, set to inactive +// } else{ +// newStatus = "active"; +// } + +// // Update the bot status in the Realtime Database +// await set(dbRef, newStatus); + +// // Respond with a confirmation message +// interaction.editReply({ +// content: `The bot has been turned ${newStatus === "active" ? "on" : "off"} for this server.`, +// }); + +// } catch (error) { +// console.error("Error toggling bot status:", error); +// interaction.editReply({ +// content: "There was an error while toggling the bot's status. Please try again later.", +// }); +// } +// } \ No newline at end of file diff --git a/src/serverSetting.ts b/src/serverSetting.ts index b3bedaa..3aaeebe 100644 --- a/src/serverSetting.ts +++ b/src/serverSetting.ts @@ -2,17 +2,17 @@ import { get, ref, set } from "firebase/database"; import database from "./firebase"; // Import the Realtime Database instance // Get the current setting for the server (whether the bot is enabled or disabled) -export async function getServerSetting(guildId: string): Promise { +export async function getServerSetting(guildId: string): Promise { const dbRef = ref(database, `servers/${guildId}/botStatus`); try { const snapshot = await get(dbRef); if (snapshot.exists()) { - return snapshot.val() === "active"; // Check if the bot is "active" + return snapshot.val(); // Check if the bot is "active" } else { // Default to "active" if no setting is found await set(dbRef, "active"); - return true; + return "active"; } } catch (error) { console.error("Error getting server setting:", error); @@ -21,12 +21,12 @@ export async function getServerSetting(guildId: string): Promise { } // Toggle the bot's enabled/disabled setting for the server -export async function toggleServerSetting(guildId: string): Promise { +export async function toggleServerSetting(guildId: string): Promise { const currentSetting = await getServerSetting(guildId); const newSetting = currentSetting ? "inactive" : "active"; // Switch between "active" and "inactive" const dbRef = ref(database, `servers/${guildId}/botStatus`); await set(dbRef, newSetting); - return newSetting === "active"; + return newSetting; } \ No newline at end of file From 7d6b3dc26c6fe948a77e4da093205f9eb8d5bdb0 Mon Sep 17 00:00:00 2001 From: bryansturdivant <157143446+bryansturdivant@users.noreply.github.com> Date: Sat, 22 Mar 2025 23:16:29 -0400 Subject: [PATCH 06/10] ready for testing --- src/interactions.ts | 62 ++++----------------------------------------- 1 file changed, 5 insertions(+), 57 deletions(-) diff --git a/src/interactions.ts b/src/interactions.ts index 48daa6c..f918980 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -224,21 +224,21 @@ export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { -// await interaction.deferReply({ flags: 64 }); // Defer the reply to allow time for the operation - -// const guildId = interaction.guildId!; // Get the guild ID - -// try { -// // Use the helper functions to get and toggle the bot status -// const newStatus = await toggleServerSetting(guildId); // Toggle the bot status - -// // Respond with a confirmation message -// interaction.editReply({ -// content: `The bot has been turned ${newStatus === "active" ? "on" : "off"} for this server.`, -// }); -// } catch (error) { -// console.error("Error toggling bot status:", error); -// interaction.editReply({ -// content: "There was an error while toggling the bot's status. Please try again later.", -// }); -// } -// } -// export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { -// await interaction.deferReply({ flags:64}); - -// const guildId = interaction.guildId!; // Get the guild ID -// const dbRef = ref(db, `servers/${guildId}/botStatus`); - -// try { -// // Get the current bot status from the Realtime Database -// const snapshot = await get(dbRef); -// let newStatus = "active"; // Default to 'active' - -// if (snapshot.exists() && snapshot.val() === "active") { -// newStatus = "inactive"; // If active, set to inactive -// } else{ -// newStatus = "active"; -// } - -// // Update the bot status in the Realtime Database -// await set(dbRef, newStatus); - -// // Respond with a confirmation message -// interaction.editReply({ -// content: `The bot has been turned ${newStatus === "active" ? "on" : "off"} for this server.`, -// }); - -// } catch (error) { -// console.error("Error toggling bot status:", error); -// interaction.editReply({ -// content: "There was an error while toggling the bot's status. Please try again later.", -// }); -// } -// } \ No newline at end of file From 01c45e318ec462bf8baefd4c03f88cddcb8efabb Mon Sep 17 00:00:00 2001 From: BoppleOpple Date: Sun, 23 Mar 2025 14:09:42 -0400 Subject: [PATCH 07/10] moved noah's authentication to interactions.ts --- src/interactions.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/interactions.ts b/src/interactions.ts index f918980..4189597 100644 --- a/src/interactions.ts +++ b/src/interactions.ts @@ -2,7 +2,9 @@ import { CacheType, ChatInputCommandInteraction, EmbedBuilder, - MessageContextMenuCommandInteraction + MessageContextMenuCommandInteraction, + MessageFlags, + PermissionsBitField } from "discord.js"; import { analyzeTone, analyzeMoodColor } from "./gptRequests"; import db from './firebase'; // Import from your firebase.ts file @@ -216,7 +218,12 @@ export async function requestAnonymousClarification(interaction: MessageContextM } } export async function toggleBot(interaction: ChatInputCommandInteraction): Promise { - await interaction.deferReply({ flags:64}); + await interaction.deferReply({ flags: MessageFlags.Ephemeral }); + + if (!(interaction.member?.permissions as PermissionsBitField).has(PermissionsBitField.Flags.ManageGuild)) { + interaction.editReply('You need "Manage Server" permission to toggle the bot!'); + return; + } const guildId = interaction.guildId!; // Get the guild ID const dbRef = ref(db, `servers/${guildId}/botStatus`); From 1a7840f4596f1345f46c48567fb45e32a7b4d84f Mon Sep 17 00:00:00 2001 From: BoppleOpple Date: Sun, 23 Mar 2025 14:09:56 -0400 Subject: [PATCH 08/10] moved noah's authentication to interactions.ts --- test-server-configs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-server-configs.json b/test-server-configs.json index 0d35aab..78cb1d0 100644 --- a/test-server-configs.json +++ b/test-server-configs.json @@ -1,7 +1,7 @@ { "123456789": { "isEnabled": false, - "lastToggled": "2025-03-02T22:56:10.977Z", + "lastToggled": "2025-03-23T18:08:38.871Z", "toggledBy": "987654321" } } \ No newline at end of file From a55dc89a35dbd974c1c3e11a2b19fc788acc6fc4 Mon Sep 17 00:00:00 2001 From: BoppleOpple Date: Sun, 23 Mar 2025 14:19:52 -0400 Subject: [PATCH 09/10] moved default config files to res/ --- server-configs.json => res/server-configs.json | 0 test-server-configs.json => res/test-server-configs.json | 2 +- src/serverConfigManager.test.ts | 2 +- src/serverConfigManager.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename server-configs.json => res/server-configs.json (100%) rename test-server-configs.json => res/test-server-configs.json (62%) diff --git a/server-configs.json b/res/server-configs.json similarity index 100% rename from server-configs.json rename to res/server-configs.json diff --git a/test-server-configs.json b/res/test-server-configs.json similarity index 62% rename from test-server-configs.json rename to res/test-server-configs.json index 78cb1d0..311da4e 100644 --- a/test-server-configs.json +++ b/res/test-server-configs.json @@ -1,7 +1,7 @@ { "123456789": { "isEnabled": false, - "lastToggled": "2025-03-23T18:08:38.871Z", + "lastToggled": "2025-03-23T18:13:31.394Z", "toggledBy": "987654321" } } \ No newline at end of file diff --git a/src/serverConfigManager.test.ts b/src/serverConfigManager.test.ts index 703c027..ec3238b 100644 --- a/src/serverConfigManager.test.ts +++ b/src/serverConfigManager.test.ts @@ -4,7 +4,7 @@ import path from 'path'; import { ServerConfigManager } from './serverConfigManager'; describe('ServerConfigManager', () => { - const TEST_CONFIG_PATH = './test-server-configs.json'; + const TEST_CONFIG_PATH = './res/test-server-configs.json'; let serverConfigManager: ServerConfigManager; beforeEach(() => { diff --git a/src/serverConfigManager.ts b/src/serverConfigManager.ts index 349f06f..691be11 100644 --- a/src/serverConfigManager.ts +++ b/src/serverConfigManager.ts @@ -12,7 +12,7 @@ class ServerConfigManager { private configPath: string; private serverStates: Map; - constructor(configPath: string = './server-configs.json') { + constructor(configPath: string = './res/server-configs.json') { this.configPath = path.resolve(configPath); this.serverStates = new Map(); From 23fe0c3665b9ebc2c52583b505c219d02212b4a9 Mon Sep 17 00:00:00 2001 From: BoppleOpple Date: Sun, 23 Mar 2025 14:26:17 -0400 Subject: [PATCH 10/10] updated packages --- package-lock.json | 141 ----------------------------------- res/test-server-configs.json | 2 +- 2 files changed, 1 insertion(+), 142 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ae786a..4cf8487 100644 --- a/package-lock.json +++ b/package-lock.json @@ -714,15 +714,9 @@ "license": "Apache-2.0" }, "node_modules/@firebase/app": { -<<<<<<< HEAD "version": "0.11.3", "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.11.3.tgz", "integrity": "sha512-QlTZl/RcqPSonYxB87n8KgAUW2L6ZZz0W4D91PVmQ1tJPsKsKPrWAFHL0ii2cQW6FxTxfNjbZ7kucuIcKXk3tw==", -======= - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.11.2.tgz", - "integrity": "sha512-bFee0hPJZBzNtiizRxdgsu8C9DW3mn1y0OJJ4zHQsccjDYzGOfvN0G3CMGyBIiwNctsFpQa8orbp2IKywoUeqA==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/component": "0.6.13", @@ -736,15 +730,9 @@ } }, "node_modules/@firebase/app-check": { -<<<<<<< HEAD "version": "0.8.13", "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.13.tgz", "integrity": "sha512-ONsgml8/dplUOAP42JQO6hhiWDEwR9+RUTLenxAN9S8N6gel/sDQ9Ci721Py1oASMGdDU8v9R7xAZxzvOX5lPg==", -======= - "version": "0.8.12", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.8.12.tgz", - "integrity": "sha512-LxjcoIFOU4sgK07ZWb8XDHxuVB+UKs41vPK+Sg9PeZMvEoz84fndFAx8Nz2nipiya2EmyxBgVhff8Hi6GBt+XA==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/component": "0.6.13", @@ -760,21 +748,12 @@ } }, "node_modules/@firebase/app-check-compat": { -<<<<<<< HEAD "version": "0.3.20", "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.20.tgz", "integrity": "sha512-/twgmlnNAaZ/wbz3kcQrL/26b+X+zUX+lBmu5LwwEcWcpnb+mrVEAKhD7/ttm52dxYiSWtLDeuXy3FXBhqBC5A==", "license": "Apache-2.0", "dependencies": { "@firebase/app-check": "0.8.13", -======= - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.3.19.tgz", - "integrity": "sha512-G8FMiqhrKc4gEEujrBDBBrbRav8MGqoLObWj1hy/riCSg4XlRYhpnq3ev8E9HTirqU1tAGH6oJl7vr+jfM7YNA==", - "license": "Apache-2.0", - "dependencies": { - "@firebase/app-check": "0.8.12", ->>>>>>> main "@firebase/app-check-types": "0.5.3", "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", @@ -801,21 +780,12 @@ "license": "Apache-2.0" }, "node_modules/@firebase/app-compat": { -<<<<<<< HEAD "version": "0.2.52", "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.52.tgz", "integrity": "sha512-0p/l1KiwhwwYTcPWoleFQHftOnYzeXvyVf3WNZyKFBAoQMpCVW6bVm/uO1bXF91AwU1JN0og888Y6Sc8avqZ+A==", "license": "Apache-2.0", "dependencies": { "@firebase/app": "0.11.3", -======= - "version": "0.2.51", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.51.tgz", - "integrity": "sha512-pxF1+coABt+ugqNI0YXDlmkKv4kh3pjI5BqIJJ1VXBo42OZbKMsQbFeos14YBrWwiqqSjUvQ70FBNsv5E2wuxg==", - "license": "Apache-2.0", - "dependencies": { - "@firebase/app": "0.11.2", ->>>>>>> main "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", "@firebase/util": "1.11.0", @@ -904,15 +874,9 @@ } }, "node_modules/@firebase/data-connect": { -<<<<<<< HEAD "version": "0.3.2", "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.2.tgz", "integrity": "sha512-PYG55JRTmvYrUuXXmYBsZexwKVP9aR3mIRRHxB9V2bQeRDZky6JtRZnH3GLhf4ZsxZy5Ewd8ul/jTOYR4gpD9w==", -======= - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@firebase/data-connect/-/data-connect-0.3.1.tgz", - "integrity": "sha512-PNlfAJ2mcbyRlWfm41nfk8EksTuvMFTFIX+puNzeUa6OTIDtyp1IX1NJVc7n6WpfbErN7tNqcOEMe6BMtpcjVA==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/auth-interop-types": "0.2.4", @@ -926,15 +890,9 @@ } }, "node_modules/@firebase/database": { -<<<<<<< HEAD "version": "1.0.14", "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.14.tgz", "integrity": "sha512-9nxYtkHAG02/Nh2Ssms1T4BbWPPjiwohCvkHDUl4hNxnki1kPgsLo5xe9kXNzbacOStmVys+RUXvwzynQSKmUQ==", -======= - "version": "1.0.13", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-1.0.13.tgz", - "integrity": "sha512-cdc+LuseKdJXzlrCx8ePMXyctSWtYS9SsP3y7EeA85GzNh/IL0b7HOq0eShridL935iQ0KScZCj5qJtKkGE53g==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/app-check-interop-types": "0.3.3", @@ -950,7 +908,6 @@ } }, "node_modules/@firebase/database-compat": { -<<<<<<< HEAD "version": "2.0.5", "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.0.5.tgz", "integrity": "sha512-CNf1UbvWh6qIaSf4sn6sx2DTDz/em/D7QxULH1LTxxDQHr9+CeYGvlAqrKnk4ZH0P0eIHyQFQU7RwkUJI0B9gQ==", @@ -959,16 +916,6 @@ "@firebase/component": "0.6.13", "@firebase/database": "1.0.14", "@firebase/database-types": "1.0.10", -======= - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-2.0.4.tgz", - "integrity": "sha512-4qsptwZ3DTGNBje56ETItZQyA/HMalOelnLmkC3eR0M6+zkzOHjNHyWUWodW2mqxRKAM0sGkn+aIwYHKZFJXug==", - "license": "Apache-2.0", - "dependencies": { - "@firebase/component": "0.6.13", - "@firebase/database": "1.0.13", - "@firebase/database-types": "1.0.9", ->>>>>>> main "@firebase/logger": "0.4.4", "@firebase/util": "1.11.0", "tslib": "^2.1.0" @@ -978,15 +925,9 @@ } }, "node_modules/@firebase/database-types": { -<<<<<<< HEAD "version": "1.0.10", "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.10.tgz", "integrity": "sha512-mH6RC1E9/Pv8jf1/p+M8YFTX+iu+iHDN89hecvyO7wHrI4R1V0TXjxOHvX3nLJN1sfh0CWG6CHZ0VlrSmK/cwg==", -======= - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-1.0.9.tgz", - "integrity": "sha512-uCntrxPbJHhZsNRpMhxNCm7GzhYWX+7J2e57wq1ZZ4NJrQw5DORgkAzJMByYZcVAjgADnCxxhK/GkoypH+XpvQ==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/app-types": "0.9.3", @@ -994,15 +935,9 @@ } }, "node_modules/@firebase/firestore": { -<<<<<<< HEAD "version": "4.7.10", "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.10.tgz", "integrity": "sha512-6nKsyo2U+jYSCcSE5sjMdDNA23DMUvYPUvsYGg09CNvcTO8GGKsPs7SpOhspsB91mbacq+u627CDAx3FUhPSSQ==", -======= - "version": "4.7.9", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.7.9.tgz", - "integrity": "sha512-uq/bUtHDqJ5ZqPHAJIlNzHpXUtcVYcASz2V6y7UmP1WLlRKEt1yf1OcQW5u8pY2yq7162OnCl5J5mkOdMTMLZw==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/component": "0.6.13", @@ -1021,7 +956,6 @@ } }, "node_modules/@firebase/firestore-compat": { -<<<<<<< HEAD "version": "0.3.45", "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.45.tgz", "integrity": "sha512-uRvi7AYPmsDl7UZwPyV7jgDGYusEZ2+U2g7MndbQHKIA8fNHpYC6QrzMs58+/IjX+kF/lkUn67Vrr0AkVjlY+Q==", @@ -1029,15 +963,6 @@ "dependencies": { "@firebase/component": "0.6.13", "@firebase/firestore": "4.7.10", -======= - "version": "0.3.44", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.44.tgz", - "integrity": "sha512-4Lv2TyHEW+FugXPgmQ0ZylSbh9uFuKDP0lCL1hX9cbxXaafhC/Nww+DWokUQ2zZcynjc8fxFunw6Xbd3QHAlgA==", - "license": "Apache-2.0", - "dependencies": { - "@firebase/component": "0.6.13", - "@firebase/firestore": "4.7.9", ->>>>>>> main "@firebase/firestore-types": "3.0.3", "@firebase/util": "1.11.0", "tslib": "^2.1.0" @@ -1195,15 +1120,9 @@ "license": "Apache-2.0" }, "node_modules/@firebase/performance": { -<<<<<<< HEAD "version": "0.7.2", "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.7.2.tgz", "integrity": "sha512-DXLLp0R0jdxH/yTmv+WTkOzsLl8YYecXh4lGZE0dzqC0IV8k+AxpLSSWvOTCkAETze8yEU/iF+PtgYVlGjfMMQ==", -======= - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.7.1.tgz", - "integrity": "sha512-SkEUurawojCjav2V2AXo6BQLDtv02NxgXPLCiAvrkn95IAKI4W/UbLKYQvMbEez/nqvmnucLyklcMlB0Q5a1iw==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/component": "0.6.13", @@ -1218,24 +1137,14 @@ } }, "node_modules/@firebase/performance-compat": { -<<<<<<< HEAD "version": "0.2.15", "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.15.tgz", "integrity": "sha512-wUxsw7hGBEMN6XfvYQqwPIQp5LcJXawWM5tmYp6L7ClCoTQuEiCKHWWVurJgN8Q1YHzoHVgjNfPQAOVu29iMVg==", -======= - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.2.14.tgz", - "integrity": "sha512-/crPg0fDqHIx+FjFoEqWxNp+lJSF40ZG7x43AAJGRaUaWLJDncQm3UJB5/mABaRZb7obs1CQAcRtd4phZFkmZg==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/component": "0.6.13", "@firebase/logger": "0.4.4", -<<<<<<< HEAD "@firebase/performance": "0.7.2", -======= - "@firebase/performance": "0.7.1", ->>>>>>> main "@firebase/performance-types": "0.2.3", "@firebase/util": "1.11.0", "tslib": "^2.1.0" @@ -1349,15 +1258,9 @@ } }, "node_modules/@firebase/vertexai": { -<<<<<<< HEAD "version": "1.2.0", "resolved": "https://registry.npmjs.org/@firebase/vertexai/-/vertexai-1.2.0.tgz", "integrity": "sha512-WUYIzFpOipjFXT2i0hT26wivJoIximizQptVs3KAxFAqbVlO8sjKPsMkgz0bh+tdKlqP4SUDda71fMUZXUKHgA==", -======= - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@firebase/vertexai/-/vertexai-1.1.0.tgz", - "integrity": "sha512-K8CgIFKJrfrf5lYhKnDXOu08FEmIzVExK+ApUZx4Bw2GAmLEA3wDVrsjuupuvpXZSp8QlzvEiXwqshqqc4v0pA==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/app-check-interop-types": "0.3.3", @@ -3206,20 +3109,13 @@ } }, "node_modules/firebase": { -<<<<<<< HEAD "version": "11.5.0", "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.5.0.tgz", "integrity": "sha512-ZTpO/zD5nYqY02bGpXCg1dRNLggTXPQZdLQeSeur3jYH270p1QkAZZJsm/lrKZ2W4ZjBlafTxxs4OwN38Vyocw==", -======= - "version": "11.4.0", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-11.4.0.tgz", - "integrity": "sha512-Z6kwhWIPDgIm0+NUEQxwjH14hMP7t42WSFnf/78R0Vh59VovLYTOCTM3MIdY3jlSZ9uKz56FhXrvsNXNhAn/Xg==", ->>>>>>> main "license": "Apache-2.0", "dependencies": { "@firebase/analytics": "0.10.12", "@firebase/analytics-compat": "0.2.18", -<<<<<<< HEAD "@firebase/app": "0.11.3", "@firebase/app-check": "0.8.13", "@firebase/app-check-compat": "0.3.20", @@ -3232,43 +3128,20 @@ "@firebase/database-compat": "2.0.5", "@firebase/firestore": "4.7.10", "@firebase/firestore-compat": "0.3.45", -======= - "@firebase/app": "0.11.2", - "@firebase/app-check": "0.8.12", - "@firebase/app-check-compat": "0.3.19", - "@firebase/app-compat": "0.2.51", - "@firebase/app-types": "0.9.3", - "@firebase/auth": "1.9.1", - "@firebase/auth-compat": "0.5.19", - "@firebase/data-connect": "0.3.1", - "@firebase/database": "1.0.13", - "@firebase/database-compat": "2.0.4", - "@firebase/firestore": "4.7.9", - "@firebase/firestore-compat": "0.3.44", ->>>>>>> main "@firebase/functions": "0.12.3", "@firebase/functions-compat": "0.3.20", "@firebase/installations": "0.6.13", "@firebase/installations-compat": "0.2.13", "@firebase/messaging": "0.12.17", "@firebase/messaging-compat": "0.2.17", -<<<<<<< HEAD "@firebase/performance": "0.7.2", "@firebase/performance-compat": "0.2.15", -======= - "@firebase/performance": "0.7.1", - "@firebase/performance-compat": "0.2.14", ->>>>>>> main "@firebase/remote-config": "0.6.0", "@firebase/remote-config-compat": "0.2.13", "@firebase/storage": "0.13.7", "@firebase/storage-compat": "0.3.17", "@firebase/util": "1.11.0", -<<<<<<< HEAD "@firebase/vertexai": "1.2.0" -======= - "@firebase/vertexai": "1.1.0" ->>>>>>> main } }, "node_modules/form-data": { @@ -3312,20 +3185,6 @@ "dev": true, "license": "ISC" }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", diff --git a/res/test-server-configs.json b/res/test-server-configs.json index 311da4e..2c21e24 100644 --- a/res/test-server-configs.json +++ b/res/test-server-configs.json @@ -1,7 +1,7 @@ { "123456789": { "isEnabled": false, - "lastToggled": "2025-03-23T18:13:31.394Z", + "lastToggled": "2025-03-23T18:25:56.621Z", "toggledBy": "987654321" } } \ No newline at end of file