diff --git a/package.json b/package.json index 8d7cb95..c1a6bb7 100644 --- a/package.json +++ b/package.json @@ -2,17 +2,17 @@ "name": "revolt-automod", "version": "1.0.0", "description": "", - "main": "index.js", + "type": "module", + "exports": "./index.js", "scripts": { "build": "rm -rf dist && tsc", - "start": "node dist/index", + "start": "node --experimental-specifier-resolution=node dist/index", "dev": "yarn build && yarn start" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "@janderedev/revolt.js": "^5.1.0-alpha.9-patch.0", "@types/monk": "^6.0.0", "axios": "^0.22.0", "dayjs": "^1.10.7", @@ -21,6 +21,7 @@ "form-data": "^4.0.0", "log75": "^2.2.0", "monk": "^7.3.4", + "revolt.js": "^5.2.3", "ulid": "^2.3.0", "xlsx": "^0.17.3" }, diff --git a/src/bot/commands/ban.ts b/src/bot/commands/ban.ts index cca3cfb..5780d99 100644 --- a/src/bot/commands/ban.ts +++ b/src/bot/commands/ban.ts @@ -1,5 +1,5 @@ import { ulid } from "ulid"; -import { client } from "../.."; +import { client } from "../../index"; import Infraction from "../../struct/antispam/Infraction"; import InfractionType from "../../struct/antispam/InfractionType"; import Command from "../../struct/Command"; diff --git a/src/bot/commands/bot_managers.ts b/src/bot/commands/bot_managers.ts index bc529fa..770debf 100644 --- a/src/bot/commands/bot_managers.ts +++ b/src/bot/commands/bot_managers.ts @@ -1,9 +1,8 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; import { hasPerm, parseUser } from "../util"; import ServerConfig from "../../struct/ServerConfig"; import { client } from "../.."; -import { User } from "@janderedev/revolt.js/dist/maps/Users"; +import { User } from "revolt.js/dist/maps/Users"; import MessageCommandContext from "../../struct/MessageCommandContext"; const SYNTAX = '/admin add @user; /admin remove @user; /admin list'; diff --git a/src/bot/commands/eval.ts b/src/bot/commands/eval.ts index a6e15aa..ee306e0 100644 --- a/src/bot/commands/eval.ts +++ b/src/bot/commands/eval.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { inspect } from 'util'; import { client } from "../.."; diff --git a/src/bot/commands/help.ts b/src/bot/commands/help.ts index f3e7d07..1c73589 100644 --- a/src/bot/commands/help.ts +++ b/src/bot/commands/help.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; export default { name: 'help', diff --git a/src/bot/commands/kick.ts b/src/bot/commands/kick.ts index 271374b..f2b8391 100644 --- a/src/bot/commands/kick.ts +++ b/src/bot/commands/kick.ts @@ -1,4 +1,4 @@ -import { Member } from "@janderedev/revolt.js/dist/maps/Members"; +import { Member } from "revolt.js/dist/maps/Members"; import { ulid } from "ulid"; import { client } from "../.."; import Infraction from "../../struct/antispam/Infraction"; diff --git a/src/bot/commands/moderator.ts b/src/bot/commands/moderator.ts index 0a71927..75c178a 100644 --- a/src/bot/commands/moderator.ts +++ b/src/bot/commands/moderator.ts @@ -1,9 +1,9 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { isBotManager, NO_MANAGER_MSG, parseUser } from "../util"; import ServerConfig from "../../struct/ServerConfig"; import { client } from "../.."; -import { User } from "@janderedev/revolt.js/dist/maps/Users"; +import { User } from "revolt.js/dist/maps/Users"; import MessageCommandContext from "../../struct/MessageCommandContext"; const SYNTAX = '/mod add @user; /mod remove @user; /mod list'; diff --git a/src/bot/commands/ping.ts b/src/bot/commands/ping.ts index 59cadf5..30e2c8a 100644 --- a/src/bot/commands/ping.ts +++ b/src/bot/commands/ping.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { client } from "../.."; export default { diff --git a/src/bot/commands/prefix.ts b/src/bot/commands/prefix.ts index d0d55c0..23f153b 100644 --- a/src/bot/commands/prefix.ts +++ b/src/bot/commands/prefix.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { client } from "../.."; import ServerConfig from "../../struct/ServerConfig"; import { DEFAULT_PREFIX } from "../modules/command_handler"; diff --git a/src/bot/commands/purge.ts b/src/bot/commands/purge.ts index 6bd95cf..37a264f 100644 --- a/src/bot/commands/purge.ts +++ b/src/bot/commands/purge.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { decodeTime } from 'ulid'; import { isModerator, parseUser } from "../util"; diff --git a/src/bot/commands/settings.ts b/src/bot/commands/settings.ts index 4f3c4ec..ba43447 100644 --- a/src/bot/commands/settings.ts +++ b/src/bot/commands/settings.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { client } from "../.."; import AutomodSettings from "../../struct/antispam/AutomodSettings"; import AntispamRule from "../../struct/antispam/AntispamRule"; diff --git a/src/bot/commands/shell_eval.ts b/src/bot/commands/shell_eval.ts index 684ce9f..9a1f722 100644 --- a/src/bot/commands/shell_eval.ts +++ b/src/bot/commands/shell_eval.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { exec } from 'child_process'; export default { diff --git a/src/bot/commands/test.ts b/src/bot/commands/test.ts index cc75713..9a3ed92 100644 --- a/src/bot/commands/test.ts +++ b/src/bot/commands/test.ts @@ -1,5 +1,5 @@ import Command from "../../struct/Command"; -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; export default { name: 'test', diff --git a/src/bot/commands/whitelist.ts b/src/bot/commands/whitelist.ts index 3c7a7d6..a6a6e97 100644 --- a/src/bot/commands/whitelist.ts +++ b/src/bot/commands/whitelist.ts @@ -1,5 +1,5 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; -import { User } from "@janderedev/revolt.js/dist/maps/Users"; +import { Message } from "revolt.js/dist/maps/Messages"; +import { User } from "revolt.js/dist/maps/Users"; import { client } from "../.."; import Command from "../../struct/Command"; import MessageCommandContext from "../../struct/MessageCommandContext"; diff --git a/src/bot/logger.ts b/src/bot/logger.ts index e793423..bc13cd4 100644 --- a/src/bot/logger.ts +++ b/src/bot/logger.ts @@ -1,5 +1,6 @@ import Log75, { LogLevel } from 'log75'; -let logger = new Log75(process.env.NODE_ENV == 'production' ? LogLevel.Standard : LogLevel.Debug); +// Thanks to being forced to switch to ESM this broke somehow? +let logger = new (Log75 as any).default(process.env.NODE_ENV == 'production' ? LogLevel.Standard : LogLevel.Debug); export default logger; diff --git a/src/bot/modules/antispam.ts b/src/bot/modules/antispam.ts index be54007..3fe04cf 100644 --- a/src/bot/modules/antispam.ts +++ b/src/bot/modules/antispam.ts @@ -1,4 +1,4 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { ulid } from "ulid"; import { client } from "../.."; import AntispamRule from "../../struct/antispam/AntispamRule"; diff --git a/src/bot/modules/command_handler.ts b/src/bot/modules/command_handler.ts index 107ac54..3e5ba86 100644 --- a/src/bot/modules/command_handler.ts +++ b/src/bot/modules/command_handler.ts @@ -7,83 +7,92 @@ import ServerConfig from "../../struct/ServerConfig"; import { antispam } from "./antispam"; import checkCustomRules from "./custom_rules/custom_rules"; import MessageCommandContext from "../../struct/MessageCommandContext"; +import { fileURLToPath } from 'url'; + +// thanks a lot esm +const filename = fileURLToPath(import.meta.url); +const dirname = path.dirname(filename); const DEFAULT_PREFIX = process.env['PREFIX'] ?? process.env['BOT_PREFIX'] ?? process.env['COMMAND_PREFIX'] ?? '/'; -let commands: Command[] = fs.readdirSync(path.join(__dirname, '..', 'commands')) - .filter(file => file.endsWith('.js')) - .map(file => require(path.join(__dirname, '..', 'commands', file)).default as Command); +(async () => { + let commands: Command[] = (await Promise.all( + fs.readdirSync(path.join(dirname, '..', 'commands')) + .filter(file => file.endsWith('.js')) + .map(async file => await import(path.join(dirname, '..', 'commands', file)) as Command) + )).map(c => (c as any).default) -client.on('message', async msg => { - logger.debug(`Message -> ${msg.content}`); + client.on('message', async msg => { + logger.debug(`Message -> ${msg.content}`); - if (typeof msg.content != 'string' || - msg.author_id == client.user?._id || - !msg.channel?.server) return; + if (typeof msg.content != 'string' || + msg.author_id == client.user?._id || + !msg.channel?.server) return; - // Send message through anti spam check and custom rules - if (!await antispam(msg)) return; - checkCustomRules(msg); + // Send message through anti spam check and custom rules + if (!await antispam(msg)) return; + checkCustomRules(msg); - let args = msg.content.split(' '); - let cmdName = args.shift() ?? ''; - - let config: ServerConfig = (await client.db.get('servers').findOne({ 'id': msg.channel?.server_id })) ?? {}; - let guildPrefix = config.prefix ?? DEFAULT_PREFIX; + let args = msg.content.split(' '); + let cmdName = args.shift() ?? ''; - if (cmdName.startsWith(`<@${client.user?._id}>`)) { - cmdName = cmdName.substr(`<@${client.user?._id}>`.length); - if (!cmdName) cmdName = args.shift() ?? ''; // Space between mention and command name - } else if (cmdName.startsWith(guildPrefix)) { - cmdName = cmdName.substr(guildPrefix.length); - if (config.spaceAfterPrefix && !cmdName) cmdName = args.shift() ?? ''; - } else return; + let config: ServerConfig = (await client.db.get('servers').findOne({ 'id': msg.channel?.server_id })) ?? {}; + let guildPrefix = config.prefix ?? DEFAULT_PREFIX; - if (!cmdName) return; + if (cmdName.startsWith(`<@${client.user?._id}>`)) { + cmdName = cmdName.substr(`<@${client.user?._id}>`.length); + if (!cmdName) cmdName = args.shift() ?? ''; // Space between mention and command name + } else if (cmdName.startsWith(guildPrefix)) { + cmdName = cmdName.substr(guildPrefix.length); + if (config.spaceAfterPrefix && !cmdName) cmdName = args.shift() ?? ''; + } else return; - let cmd = commands.find(c => c.name == cmdName || (c.aliases?.indexOf(cmdName!) ?? -1) > -1); - if (!cmd) return; + if (!cmdName) return; - let ownerIDs = process.env['BOT_OWNERS'] ? process.env['BOT_OWNERS'].split(',') : []; - if (cmd.restrict == 'BOTOWNER' && ownerIDs.indexOf(msg.author_id) == -1) { - logger.warn(`User ${msg.author?.username} tried to run owner-only command: ${cmdName}`); - msg.reply('🔒 Access denied'); - return; - } + let cmd = commands.find(c => c.name == cmdName || (c.aliases?.indexOf(cmdName!) ?? -1) > -1); + if (!cmd) return; - let serverCtx = msg.channel?.server; - - if (config.linkedServer) { - try { - serverCtx = client.servers.get(config.linkedServer) - || await client.servers.fetch(config.linkedServer); - } catch(e) { - msg.reply(`# Error\n` + - `Failed to fetch linked server. This command will be executed in the context of this server.\n\n` + - `Error: \`\`\`js\n${e}\n\`\`\``); + let ownerIDs = process.env['BOT_OWNERS'] ? process.env['BOT_OWNERS'].split(',') : []; + if (cmd.restrict == 'BOTOWNER' && ownerIDs.indexOf(msg.author_id) == -1) { + logger.warn(`User ${msg.author?.username} tried to run owner-only command: ${cmdName}`); + msg.reply('🔒 Access denied'); + return; } - } - let message: MessageCommandContext = msg as MessageCommandContext; - message.serverContext = serverCtx; + let serverCtx = msg.channel?.server; - logger.info(`Command: ${message.author?.username} in ${message.channel?.server?.name}: ${message.content}`); + if (config.linkedServer) { + try { + serverCtx = client.servers.get(config.linkedServer) + || await client.servers.fetch(config.linkedServer); + } catch(e) { + msg.reply(`# Error\n` + + `Failed to fetch linked server. This command will be executed in the context of this server.\n\n` + + `Error: \`\`\`js\n${e}\n\`\`\``); + } + } - // Create document for server in DB, if not already present - if (JSON.stringify(config) == '{}') await client.db.get('servers').insert({ id: message.channel?.server_id }); + let message: MessageCommandContext = msg as MessageCommandContext; + message.serverContext = serverCtx; - if (cmd.removeEmptyArgs !== false) { - args = args.filter(a => a.length > 0); - } + logger.info(`Command: ${message.author?.username} in ${message.channel?.server?.name}: ${message.content}`); - try { - cmd.run(message, args); - } catch(e) { - message.reply(`### An error has occurred:\n\`\`\`js\n${e}\n\`\`\``); - } -}); + // Create document for server in DB, if not already present + if (JSON.stringify(config) == '{}') await client.db.get('servers').insert({ id: message.channel?.server_id }); + + if (cmd.removeEmptyArgs !== false) { + args = args.filter(a => a.length > 0); + } + + try { + cmd.run(message, args); + } catch(e) { + message.reply(`### An error has occurred:\n\`\`\`js\n${e}\n\`\`\``); + } + }); +})(); export { DEFAULT_PREFIX } diff --git a/src/bot/modules/custom_rules/actions/delete.ts b/src/bot/modules/custom_rules/actions/delete.ts index ea065aa..b721089 100644 --- a/src/bot/modules/custom_rules/actions/delete.ts +++ b/src/bot/modules/custom_rules/actions/delete.ts @@ -1,4 +1,4 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import CustomRuleAction from "../../../../struct/antispam/CustomRuleAction"; async function execute(message: Message, action: CustomRuleAction) { diff --git a/src/bot/modules/custom_rules/actions/sendMessage.ts b/src/bot/modules/custom_rules/actions/sendMessage.ts index b1172cf..48962ec 100644 --- a/src/bot/modules/custom_rules/actions/sendMessage.ts +++ b/src/bot/modules/custom_rules/actions/sendMessage.ts @@ -1,4 +1,4 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { client } from "../../../.."; import CustomRuleAction from "../../../../struct/antispam/CustomRuleAction"; diff --git a/src/bot/modules/custom_rules/actions/warn.ts b/src/bot/modules/custom_rules/actions/warn.ts index 56fa028..805d531 100644 --- a/src/bot/modules/custom_rules/actions/warn.ts +++ b/src/bot/modules/custom_rules/actions/warn.ts @@ -1,4 +1,4 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import CustomRuleAction from "../../../../struct/antispam/CustomRuleAction"; import { storeInfraction } from '../../../util'; import Infraction from "../../../../struct/antispam/Infraction"; diff --git a/src/bot/modules/custom_rules/custom_rules.ts b/src/bot/modules/custom_rules/custom_rules.ts index 91a090f..7dbf40e 100644 --- a/src/bot/modules/custom_rules/custom_rules.ts +++ b/src/bot/modules/custom_rules/custom_rules.ts @@ -1,4 +1,4 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { client } from "../../.."; import ServerConfig from "../../../struct/ServerConfig"; import logger from "../../logger"; diff --git a/src/bot/modules/custom_rules/message_content_trigger.ts b/src/bot/modules/custom_rules/message_content_trigger.ts index 9c8ab7b..f1cf472 100644 --- a/src/bot/modules/custom_rules/message_content_trigger.ts +++ b/src/bot/modules/custom_rules/message_content_trigger.ts @@ -1,4 +1,4 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; +import { Message } from "revolt.js/dist/maps/Messages"; import { client } from "../../.."; import CustomRuleTrigger from "../../../struct/antispam/CustomRuleTrigger"; import VM from 'vm'; diff --git a/src/bot/modules/mod_logs.ts b/src/bot/modules/mod_logs.ts index 6d36bef..5ba5a8f 100644 --- a/src/bot/modules/mod_logs.ts +++ b/src/bot/modules/mod_logs.ts @@ -1,5 +1,5 @@ -import { Member } from "@janderedev/revolt.js/dist/maps/Members"; -import { Server } from "@janderedev/revolt.js/dist/maps/Servers"; +import { Member } from "revolt.js/dist/maps/Members"; +import { Server } from "revolt.js/dist/maps/Servers"; import { client } from "../.."; import Infraction from "../../struct/antispam/Infraction"; import LogMessage from "../../struct/LogMessage"; diff --git a/src/bot/modules/user_scan.ts b/src/bot/modules/user_scan.ts index 14b5be1..2602d50 100644 --- a/src/bot/modules/user_scan.ts +++ b/src/bot/modules/user_scan.ts @@ -2,7 +2,7 @@ import { client } from "../.."; import fs from 'fs'; import { FindOneResult } from "monk"; import ScannedUser from "../../struct/ScannedUser"; -import { Member } from "@janderedev/revolt.js/dist/maps/Members"; +import { Member } from "revolt.js/dist/maps/Members"; import ServerConfig from "../../struct/ServerConfig"; import logger from "../logger"; import { sendLogMessage } from "../util"; diff --git a/src/bot/util.ts b/src/bot/util.ts index ea5b9c6..d0a72fe 100644 --- a/src/bot/util.ts +++ b/src/bot/util.ts @@ -1,11 +1,11 @@ -import { Member } from "@janderedev/revolt.js/dist/maps/Members"; -import { User } from "@janderedev/revolt.js/dist/maps/Users"; +import { Member } from "revolt.js/dist/maps/Members"; +import { User } from "revolt.js/dist/maps/Users"; import { client } from ".."; import Infraction from "../struct/antispam/Infraction"; import ServerConfig from "../struct/ServerConfig"; import FormData from 'form-data'; import axios from 'axios'; -import { Server } from "@janderedev/revolt.js/dist/maps/Servers"; +import { Server } from "revolt.js/dist/maps/Servers"; import LogConfig from "../struct/LogConfig"; import LogMessage from "../struct/LogMessage"; import { ColorResolvable, MessageAttachment, MessageEmbed, WebhookClient } from "discord.js"; diff --git a/src/index.ts b/src/index.ts index cbcf8d0..9bb6623 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ -require('dotenv').config(); +import { config } from 'dotenv'; +config(); import logger from './bot/logger'; import AutomodClient, { login } from './struct/AutomodClient'; diff --git a/src/struct/AutomodClient.ts b/src/struct/AutomodClient.ts index 282703b..ed34e7e 100644 --- a/src/struct/AutomodClient.ts +++ b/src/struct/AutomodClient.ts @@ -1,4 +1,4 @@ -import * as Revolt from "@janderedev/revolt.js"; +import * as Revolt from "revolt.js"; import { IMonkManager } from 'monk'; import logger from '../bot/logger'; import { adminBotLog } from "../bot/logging"; diff --git a/src/struct/MessageCommandContext.ts b/src/struct/MessageCommandContext.ts index a98eb11..020a9f7 100644 --- a/src/struct/MessageCommandContext.ts +++ b/src/struct/MessageCommandContext.ts @@ -1,5 +1,5 @@ -import { Message } from "@janderedev/revolt.js/dist/maps/Messages"; -import { Server } from "@janderedev/revolt.js/dist/maps/Servers"; +import { Message } from "revolt.js/dist/maps/Messages"; +import { Server } from "revolt.js/dist/maps/Servers"; class MessageCommandContext extends Message { // The server to which the command should be applied. diff --git a/tsconfig.json b/tsconfig.json index b454ed0..95d3408 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,9 +24,9 @@ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ + "module": "ES2020", /* Specify what module code is generated. */ "rootDir": "./src", /* Specify the root folder within your source files. */ - // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ diff --git a/yarn.lock b/yarn.lock index 982a50d..10eabdd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27,21 +27,15 @@ combined-stream "^1.0.8" mime-types "^2.1.12" -"@janderedev/revolt.js@^5.1.0-alpha.9-patch.0": - version "5.1.0-alpha.9-patch.0" - resolved "https://registry.yarnpkg.com/@janderedev/revolt.js/-/revolt.js-5.1.0-alpha.9-patch.0.tgz#de1da9e4d09b6d07f341b9d7590a730f185de84a" - integrity sha512-9fzZ/hCy16//UOIHT0k7dDPyD+Wl/ijTU/wCM25EQcz2saUgBcwatjrVp2KJ0/jZmqiiYHQayCRCku2WJCyZcQ== - dependencies: - axios "^0.21.4" - eventemitter3 "^4.0.7" - exponential-backoff "^3.1.0" - isomorphic-ws "^4.0.1" - lodash.defaultsdeep "^4.6.1" - lodash.isequal "^4.5.0" - mobx "^6.3.2" - revolt-api "^0.5.3-alpha.8-patch.0" - ulid "^2.3.0" - ws "^8.2.2" +"@insertish/exponential-backoff@3.1.0-patch.0": + version "3.1.0-patch.0" + resolved "https://registry.yarnpkg.com/@insertish/exponential-backoff/-/exponential-backoff-3.1.0-patch.0.tgz#1fff134f70fc0906d11d09069d51183b542e42cf" + integrity sha512-1qhW81s3GDbssyaxRWdpBAn1cIw5s393HnrdYFjfa2i6rq3SEjQDK6U80g6dq/K0or6JRr2eCn75Wfc1IrGM0g== + +"@insertish/isomorphic-ws@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@insertish/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#5bcd6f73b93efa9ccdb6abf887ae808d40827169" + integrity sha512-kFD/p8T4Hkqr992QrdkbW/cQ/W/q2d9MPCobwzBv2PwTKLkCD9RaYDy6m17qRnSLQQ5PU0kHCG8kaOwAqzj1vQ== "@sapphire/async-queue@^1.1.8": version "1.1.9" @@ -275,20 +269,15 @@ exit-on-epipe@~1.0.1: resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== -exponential-backoff@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.0.tgz#9409c7e579131f8bd4b32d7d8094a911040f2e68" - integrity sha512-oBuz5SYz5zzyuHINoe9ooePwSu0xApKWgeNzok4hZ5YKXFh9zrQBEM15CXqoZkJJPuI2ArvqjPQd8UKJA753XA== - fflate@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.7.1.tgz#56e87e87c3f2fe01b025fbb1c4ea835990c02fa2" integrity sha512-VYM2Xy1gSA5MerKzCnmmuV2XljkpKwgJBKezW+495TTnTCh1x5HcYa1aH8wRU/MfTGhW4ziXqgwprgQUVl3Ohw== follow-redirects@^1.14.0: - version "1.14.5" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381" - integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA== + version "1.14.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" + integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== follow-redirects@^1.14.4: version "1.14.4" @@ -338,16 +327,16 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= -isomorphic-ws@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" - integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== - lodash.defaultsdeep@^4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA== +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" @@ -378,9 +367,9 @@ mime-types@^2.1.12: mime-db "1.50.0" mobx@^6.3.2: - version "6.3.7" - resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.7.tgz#9ed85561e86da45141134c8fa20cf5f9c7246c3d" - integrity sha512-X7yU7eOEyxIBk4gjIi2UIilwdw48gXh0kcZ5ex3Rc+COJsJmJ4SNpf42uYea3aUqb1hedTv5xzJrq5Q55p0P5g== + version "6.3.10" + resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.10.tgz#c3bc715c8f03717b9a2329f9697d42b7998d42e0" + integrity sha512-lfuIN5TGXBNy/5s3ggr1L+IbD+LvfZVlj5q1ZuqyV9AfMtunYQvE8G0WfewS9tgIR3I1q8HJEEbcAOsxEgLwRw== mongodb@^3.2.3: version "3.7.2" @@ -515,10 +504,27 @@ require-at@^1.0.6: resolved "https://registry.yarnpkg.com/require-at/-/require-at-1.0.6.tgz#9eb7e3c5e00727f5a4744070a7f560d4de4f6e6a" integrity sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g== -revolt-api@^0.5.3-alpha.8-patch.0: - version "0.5.3-alpha.8-patch.0" - resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.8-patch.0.tgz#3c9f981f8100a89aec1299bc110453cf01c51f89" - integrity sha512-ghupcB1nJS7fCiD41L4u+QudFoBWGE381uW4s8cuHsQS3bFXgzAH1lgtjYNoFgrVUekqQAcHWote8Kn2sOABAQ== +revolt-api@^0.5.3-alpha.9: + version "0.5.3-alpha.11" + resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.11.tgz#ed666c403676de0bc47b1fe3ed59c934c5fbd842" + integrity sha512-5obsvdSIaiW3oVcsFpXYG3FXTPUxwR+0gpPhP+89i2agGdeKhcygaRajZ5HK83/Zmr/VcZnJoSuHc+k3ZUTHyA== + +revolt.js@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.2.3.tgz#770e7fc3256d7d153fadf143acd00f4c3377f4ef" + integrity sha512-tFGt1yij56A1y3EDjTf1HoPmwHskQ0xoks58tWNCPdMvyCyrTih9qBKdHNDDOMUWdGF0qn1pWZmdVSxHriAuOA== + dependencies: + "@insertish/exponential-backoff" "3.1.0-patch.0" + "@insertish/isomorphic-ws" "^4.0.1" + axios "^0.21.4" + eventemitter3 "^4.0.7" + lodash.defaultsdeep "^4.6.1" + lodash.flatten "^4.4.0" + lodash.isequal "^4.5.0" + mobx "^6.3.2" + revolt-api "^0.5.3-alpha.9" + ulid "^2.3.0" + ws "^8.2.2" safe-buffer@^5.1.1, safe-buffer@^5.1.2: version "5.2.1" @@ -622,9 +628,9 @@ word@~0.3.0: integrity sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA== ws@^8.2.2: - version "8.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== + version "8.4.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.4.0.tgz#f05e982a0a88c604080e8581576e2a063802bed6" + integrity sha512-IHVsKe2pjajSUIl4KYMQOdlyliovpEPquKkqbwswulszzI7r0SfQrxnXdWAEqOlDCLrVSJzo+O1hAwdog2sKSQ== ws@^8.2.3: version "8.3.0"