diff --git a/addons/utils.js b/addons/utils.js deleted file mode 100644 index 8ecd50c..0000000 --- a/addons/utils.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = { - shitFormat: obj => { - if (!obj) return console.log(obj, "\n"); - const keys = Object.keys(obj); - const vals = Object.values(obj); - - keys.forEach((key, i) => { - let output = vals[i]; - if (typeof output === "object") output = "object"; - console.log(key, output); - }); - console.log(""); - }, - - formatCas: c => { - const h = Math.floor(c / 3600); - const m = Math.floor(c % 3600 / 60); - const s = Math.floor(c % 3600 % 60); - - return `${h} hodin ${m} mynut a ${s} se kund`; - } -}; diff --git a/app.js b/app.js deleted file mode 100644 index 7c4a902..0000000 --- a/app.js +++ /dev/null @@ -1,107 +0,0 @@ -const { Client } = require('discord.js'); -const fs = require("fs"); -const { formatCas } = require("./addons/utils"); - -const client = new Client(); -require('dotenv').config(); - -const prefix = process.env.PREFIX || 'more'; -const modulFolder = "./modules/"; -const eventy = { on_message: [] }; -const komandy = {}; -const aliasy = {}; -let spink = false; -const kuldan_log = {}; - -const runEvent = (name, args) => { - eventy[name].forEach(listener => { - listener(...args); - }); -}; - -fs.readdirSync(modulFolder).forEach(function (soubor) { - if (soubor.endsWith(".js")) { - const modul = require(`${modulFolder}${soubor}`); - modul.client = client; - Object.keys(modul).forEach(name => { - if (name.startsWith('on_')) { - if (!eventy[name]) { - eventy[name] = []; - if (name !== 'on_message') client.on(name.substring(3), (...args) => runEvent(name, args)); - } - eventy[name].push(modul[name]); - } else if (name === 'more_komandy') { - Object.keys(modul[name]).forEach(cmdName => { - const value = modul[name][cmdName]; - if (typeof value !== "object") { - komandy[cmdName] = { run: value }; - return; - } - komandy[cmdName] = { run: value.run, cd: value.cd }; - value.als?.forEach(al => aliasy[al] = cmdName); - }); - } - }); - } -}); - -const spim = mes => { - if (mes.content.toLowerCase() === `${prefix} zapni se`) { - if (spink) { - spink = false; - mes.client.user.setStatus("online"); - mes.channel.send("dobré ráno magoří"); - } - else mes.channel.send("tak jsi kokot?"); - } else if (!spink) { - if (mes.content.toLowerCase() === `${prefix} vypni se`) { - mes.react("855120055632134155"); - [...mes.client.voice?.connections.values()].forEach(con => con.disconnect()); - mes.client.user.setStatus("invisible"); - spink = true; - } - else return false; - } - return true; -}; - -function maKuldan(id, komand, kuldan_komandu) { - if (!kuldan_log[komand]) kuldan_log[komand] = {}; - - const cas_ted = Date.now() / 1000; - const rozdil = cas_ted - kuldan_log[komand][id]; - if (rozdil < kuldan_komandu) return kuldan_komandu - rozdil; - - kuldan_log[komand][id] = cas_ted; - return false; -} - -client.on("message", function (mes) { - if (process.env.IGNORE_MESS || spim(mes)) return; - - runEvent('on_message', [mes]); - const [mes_prefix, komand, ...args] = mes.content.split(' '); - if (mes_prefix.toLowerCase() !== prefix) return; - if (!komand) return mes.channel.send("coe voe"); - - const celArgs = args.join(' '); - const cmdName = aliasy[komand] ?? komand; - const cmd = komandy[cmdName]; - const akce = cmd?.run; - if (!akce) return mes.channel.send("co to znamena ti gadzovko"); - - if (cmd.cd) { - const zbyva = Math.round(maKuldan(mes.author.id, cmdName, cmd.cd)); - if (zbyva) return mes.channel.send(`si kkt vole maz kuldan jeste ${formatCas(zbyva)}`); - } - - if (typeof akce === "string") return mes.channel.send(akce); - const result = akce(celArgs, mes); - if (result && !result.then) mes.channel.send(result); -}); - -client.on("debug", console.log); -client.on("error", console.error); -client.on("warn", console.warn); - -client.login(process.env.TOKEN); diff --git a/modules/komArgs.js b/modules/komArgs.js deleted file mode 100644 index a414b9b..0000000 --- a/modules/komArgs.js +++ /dev/null @@ -1,40 +0,0 @@ -// Komandy, který pošlou jenom celArgs a random hovno - -module.exports = { - more_komandy: { - - rekni: (arg, mes) => { - if (mes.author.bot) return "ne"; - const corict = arg ?? "co mam jako rict"; - mes.delete(); - return corict; - }, - - clap: (arg, mes) => { - mes.delete(); - return `${arg} `; - }, - - clap2: (arg, mes) => { - mes.delete(); - return ` ${arg}`; - }, - - voliz: { - als: ["voliž"], - run: (arg, mes) => { - mes.delete(); - return `${arg}`; - } - }, - - pozdrav: arg => `zdravim ${arg}`, - - zhejti: arg => `${arg} je pycovina zasrana vimrdana`, - - uraz: { - als: ["uraž"], - run: arg => `${arg} , u suck` - } - } -}; diff --git a/modules/komComplex.js b/modules/komComplex.js deleted file mode 100644 index da4243e..0000000 --- a/modules/komComplex.js +++ /dev/null @@ -1,123 +0,0 @@ -// Komandy, který buď nějakým způsobem mění funkci nebo "vzhled" bota -// nebo donutí bota něco udělat (odeslání zprávy s výsledkem nebo smazání originální zprávy se nepočítá) - -const zarizeni = { desktop: 'Počítač', mobile: 'Mobil', web: 'Web' }; -const statusy = { online: '🟢', idle: '🟡', dnd: '🔴' }; - -const changeStatus = (mes, status) => { - mes.client.user.setStatus(status); - return "ano pane"; -}; - -const changeActivity = (mes, activity, txt) => { - mes.client.user.setActivity(txt, activity); - mes.react("730175107313565717"); - return "ano pane"; -}; - -const ping = /^<@!?\d+>$/; - -module.exports = { - more_komandy: { - - online: { - als: ["onlajn", "zelenej"], - run: (_, mes) => changeStatus(mes, "online") - }, - idle: { - als: ["žlutej", "zlutej", "afk", "idle", "nepřítomnej", "nepritomnej"], - run: (_, mes) => changeStatus(mes, "idle") - }, - dnd: { - als: ["nerusit", "nerušit", "červenej", "cervenej"], - run: (_, mes) => changeStatus(mes, "dnd") - }, - offline: { - als: ["oflajn", "neviditelnej"], - run: (_, mes) => changeStatus(mes, "invisible") - }, - - hraj: (arg, mes) => changeActivity(mes, "PLAYING", arg), - sleduj: (arg, mes) => changeActivity(mes, "WATCHING", arg), - poslouchej: (arg, mes) => changeActivity(mes, "LISTENING", arg), - soutez: { - als: ["soutěž"], - run: (arg, mes) => changeActivity(mes, "COMPETING", arg) - }, - nedelej: (_, mes) => changeActivity(mes, ""), - - fight: { - als: ["figh", "fajt"], - run: (arg, mes) => { - if (!ping.test(arg)) return 'tak si kokot ti kokote'; - - const vyherce = Math.random() < 0.5 ? mes.author : arg; - return `tento figh vyhrál: ${vyherce}!`; - } - }, - - status: (arg, mes) => { - if (!ping.test(arg)) return 'tak si kokot ti kokote'; - - const uzivatel = mes.mentions.users.first(); - const embed = { - title: `Informace o statusech pro ${uzivatel.username}:`, - color: 431075 - }; - const presence = uzivatel.presence.clientStatus; - if (!presence) { - embed.description = '*Všude je offline*'; - } else { - const uStatusy = []; - Object.keys(presence).forEach(status => { - uStatusy.push(`${zarizeni[status]}: ${statusy[presence[status]]}`); - }); - embed.description = uStatusy.join('\n'); - } - return { embed }; - }, - - zareaguj: { - als: ["react"], - run: (arg, mes) => { - if (!arg) return 'retard'; - - const emouty = arg.match(//g); - if (!emouty) return 'retard'; - - let naCo; - (async () => { - if (mes.reference) { - naCo = await mes.channel.messages.fetch(mes.reference.messageID); - } else { - const msgs = [...mes.channel.messages.cache.values()]; - naCo = msgs[msgs.length - 2]; - } - - mes.delete(); - emouty.forEach(emout => naCo.react(emout)); - })(); - } - }, - - odpocitej: (_, mes) => { - const randomshit = (dalsi, argument) => { - dalsi.edit(argument[0]); - argument.splice(0, 1); - if (argument.length) setTimeout(() => randomshit(dalsi, argument), 1000); - }; - mes.channel.send(":stop_button:").then(mes => randomshit(mes, [":five:", ":four:", ":three:", ":two:", ":one:", ":ok:"])); - }, - - pocasi: { - als: ["počasí"], - run: _ => { - const embed = { - title: "Počasí", - image: { url: "attachment://pocasi.png" } - }; - return { embed, files: ["https://util.deadfish.cz/morepocasi/v/49.4348358/12.8147250/pocasi.png"] }; - } - } - } -}; diff --git a/modules/onReady.js b/modules/onReady.js deleted file mode 100644 index 51995db..0000000 --- a/modules/onReady.js +++ /dev/null @@ -1,5 +0,0 @@ -// Prostě onready - -module.exports = { - on_ready: () => console.log('A jedeš!') -}; diff --git a/modules/status.js b/modules/status.js deleted file mode 100644 index 6ac831f..0000000 --- a/modules/status.js +++ /dev/null @@ -1,100 +0,0 @@ -const fetch = require("node-fetch"); - -const role = { online: "Online", idle: "Idle", dnd: "DND", offline: "Offline" }; -const statusy = { Offline: "0", Online: "1", Idle: "2", DND: "3", OnlinePhone: "11", IdlePhone: "12", DNDPhone: "13" }; -const prepSend = pair => { - const changes = []; - - pair.forEach(par => { - const us = par[0]; - changes.push({ id: us.id, status: par[1], nick: us.username, pfp: us.avatar ?? "" }); - }); - - poslatData({ changes }); -}; - -const poslatData = data => { - data.pwd = process.env.STAT_PASS; - fetch("http://deadfish.cz:4629/endpoint-pro-denimka/", { method: "POST", headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }); -}; - -const statusOnFoun = (bef, aft) => { - if (!bef) bef = { status: 'offline', clientStatus: {} }; - const predAPo = ["", ""]; - - [bef, aft].forEach((s, i) => { - const mobile = s.clientStatus.mobile; - if (mobile && mobile !== s.clientStatus.desktop) { - predAPo[i] = `${role[mobile]}Phone`; - } - else { - predAPo[i] = role[s.status]; - } - }); - - return predAPo; -}; - -const ziju = () => { - poslatData({ nejsemPoslej: !0 }); - setTimeout(ziju, 60_000); -}; - -if (!process.env.IGNORE_PRESENCE) ziju(); - -const getRole = (status, server) => - server.roles.cache.find(role => role.name === `Status${status}`); - -module.exports = { - - // Změna rolí podle statusu a odeslání statusu - on_presenceUpdate: (bef, aft) => { - if (process.env.IGNORE_PRESENCE) return; - - const [statusPred, statusPo] = statusOnFoun(bef, aft); - if (statusPred === statusPo) return; - const rolePred = getRole(statusPred, aft.guild); - const rolePo = getRole(statusPo, aft.guild); - - - if (rolePred) aft.member.roles.remove(rolePred); - if (rolePo) aft.member.roles.add(rolePo); - - prepSend([[aft.user, statusy[statusPo]]]); - }, - - // Odeslání statusů při startu bota - on_ready: () => { - if (process.env.IGNORE_PRESENCE) return; - - const client = module.exports.client; - const guildy = client.guilds.cache; - const memberove = client.users.cache.clone(); - const presence = []; - const changes = []; - - guildy.each(guilda => { - guilda.presences.cache.each(pres => { - if (!presence.filter(prs => prs.userID === pres.userID).length) presence.push(pres); - }); - }); - - presence.forEach(presenc => { - const status = statusOnFoun(null, presenc)[1]; - changes.push([memberove.get(presenc.userID), statusy[status]]); - memberove.delete(presenc.userID); - }); - - memberove.each(member => { - changes.push([member, 0]); - }); - - prepSend(changes); - }, - - // Odeslání statusu při změně jména nebo profilovky - on_userUpdate: (bef, aft) => { - if (!process.env.IGNORE_PRESENCE) - prepSend([[aft, statusy[statusOnFoun(null, aft.presence)[1]]]]); - } -}; diff --git a/modules/vojs.js b/modules/vojs.js deleted file mode 100644 index ea37b6a..0000000 --- a/modules/vojs.js +++ /dev/null @@ -1,148 +0,0 @@ -// Cokoliv co má něco společnýho s vojsem - -const { formatCas } = require("../addons/utils.js"); - -let vojsKuldan = 0; - -function vypocitatCas(vojsl) { - let c = new Date(); - let d = new Date(); - let hod = d.getHours(); - let min = d.getMinutes(); - if (min >= 30) { - min = 0; - if (hod == 23) { - hod = 0; - d.setDate(c.getDate() + 1); - } else { - hod++; - } - } else { - min = 30; - } - d.setHours(hod); - d.setMinutes(min); - d.setSeconds(0); - - timeouty[vojsl.channel.guild.id] = setTimeout(function () { - rekniCas(vojsl, `${nula(hod)}${nula(min)}`); - }, d - c + 3000); -} - -function rekniCas(vojsl, cas) { - if (!vojsl) return; - const d1 = vojsl.play(`./zvuky/intro.mp3`, { volume: 0.8 }); - d1.on('finish', function () { - const d2 = vojsl.play(`./zvuky/${cas}.mp3`, { volume: 1.5 }); - d2.on('finish', function () { - vojsl.play(`./zvuky/grg.mp3`, { volume: 0.5 }); - }); - }); - - vypocitatCas(vojsl); -} - -function nula(a) { - return a < 10 ? "0" + a : a; -} - -const vytahnout = (clen, patro) => { - const vojs = clen.voice.channel; - if (!vojs) return; - - const aktPatro = Number(vojs.name) || 0; - let dalsiPatro = aktPatro; - if (patro < aktPatro) dalsiPatro--; else if (patro > aktPatro) dalsiPatro++; else return; - if (dalsiPatro === 0) dalsiPatro = 'P'; - - const dalsiVojsy = [...clen.guild.channels.cache.values()].filter(channel => channel.type === 'voice' && channel.name === String(dalsiPatro)); - if (!dalsiVojsy) return; - - clen.voice.setChannel(dalsiVojsy[0]); - setTimeout(() => vytahnout(clen, patro), 1000); -}; - -const timeouty = {}; - -module.exports = { - more_komandy: { - - wojs: (_, mes) => `vojs se pise s normalnim v ti kriple ${mes.author}`, - - vojs: { - cd: 1800, - run: (arg, mes) => { - const channel = mes.member.voice.channel; - if (!channel) return `di si tam sam ne ty gadzo ${mes.author}`; - - if (arg !== 'potichu') mes.channel.send('<@&591306633196339261> vojs'); - - if (mes.guild.voice?.channel === channel && mes.guild.connection) return; - - channel.join() - .then(con => { - if (!timeouty[mes.guild.id]) { - vypocitatCas(con); - con.on('disconnect', () => { - if (timeouty[mes.guild.id]) { - clearTimeout(timeouty[mes.guild.id]); - delete timeouty[mes.guild.id]; - } - }); - } - setTimeout(() => con.play('./zvuky/nazdar.ogg'), 500); - }); - } - }, - - vypadni: { - als: ["odejdi", "disconnect", "leave", "odpoj", "votpoj", "vodpoj", "vodprejskni", "tahni", "táhni"], - run: _ => { - let vojs = mes.guild.voice; - if (!vojs) vojs = {}; - if (!vojs.channel) return mes.channel.send('nejsem ve vojsu'); - vojs.channel.leave(); - mes.react('855120055632134155'); - } - }, - - vytah: { - als: ["vitah"], - run: (arg, mes) => { - if (!mes.member) return 'kokot'; - if (!mes.member.voice.channel) return `nejsi ve vojsu ty gadzo ${mes.author}`; - if (!arg) return `napis do jakiho patra ${mes.author}`; - - vytahnout(mes.member, Number(celArgs) || 0); - } - }, - - krkacek: { - als: ["krkáček", "krkácek", "krkaček", "krk", "grg", "grgnisi", "krknisi", "grgacek", "grgáček", "grgácek", "grgaček"], - run: async (_, mes) => { - let vojs = mes.guild.voice?.connection; - let odpojit = false; - if (!vojs) { - const chanel = mes.member.voice.channel; - if (!chanel) return mes.channel.send("***grrrrrrrrg***"); - vojs = await chanel.join(); - odpojit = true; - } - vojs.play(`./zvuky/grg.mp3`, { volume: 0.5 }).on("finish", _ => { if (odpojit) vojs.channel.leave(); }); - } - } - }, - - // Neodposlouchávej - on_voiceStateUpdate: (bef, aft) => { - if (!aft.channel || !aft.guild.voice?.connection || aft.member.user === aft.guild.client.user) return; - - if (aft.selfMute && !aft.deaf) { - aft.guild.voice.connection.play('./zvuky/neodposlouchavej.ogg', { volume: 0.38 }) - .on('finish', () => { if (aft.selfMute) aft.setDeaf(true, 'otposlouchávala ta gadza'); }); - } - - if (!bef.channel) return; - if (bef.mute && bef.deaf && !aft.mute && aft.deaf) aft.setDeaf(false, 'us muze poslouchat gadza'); - } -}; diff --git a/package-lock.json b/package-lock.json index fc9dd4c..4dbd36f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,1740 @@ { "name": "denim_3001", - "version": "3001.19", - "lockfileVersion": 1, + "version": "3001.21.0", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "denim_3001", + "version": "3001.21.0", + "license": "ISC", + "dependencies": { + "@discordjs/opus": "github:discordjs/opus", + "@discordjs/voice": "^0.6.0", + "discord.js": "^13.0.1", + "dotenv": "^8.2.0", + "fluent-ffmpeg": "^2.1.2", + "node-fetch": "^2.6.1", + "prism-media": "^1.3.2", + "tweetnacl": "^1.0.3", + "yt-search": "^2.7.5", + "ytdl": "^1.4.1", + "ytdl-core": "^4.9.1" + }, + "devDependencies": { + "@types/node-fetch": "^2.5.12" + } + }, + "node_modules/@discordjs/builders": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.4.0.tgz", + "integrity": "sha512-EiwLltKph6TSaPJIzJYdzNc1PnA2ZNaaE0t0ODg3ghnpVHqfgd0YX9/srsleYHW2cw1sfIq+kbM+h0etf7GWLA==", + "dependencies": { + "@sindresorhus/is": "^4.0.1", + "discord-api-types": "^0.22.0", + "ow": "^0.27.0", + "ts-mixer": "^6.0.0", + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=14.0.0", + "npm": ">=7.0.0" + } + }, + "node_modules/@discordjs/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@discordjs/node-pre-gyp": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.0.tgz", + "integrity": "sha512-CXLpoM2hgS94i9+EAVowR92y8o3KdKc9fmoe8/FTp5XTzvoXzJln3+Ctl0oBpE6c9+11zd9oJnZPdkkOBkDPSA==", + "dependencies": { + "detect-libc": "^1.0.3", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.1", + "nopt": "^5.0.0", + "npmlog": "^4.1.2", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.0" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@discordjs/opus": { + "version": "0.5.3", + "resolved": "git+ssh://git@github.com/discordjs/opus.git#d929bdb7574fbf3ad1cea9c96277ab3fc4b96132", + "integrity": "sha512-IQhCwCy2WKXLe+qkOkwO1Wjgk20uqeAbqM62tCbzIqbTsXX4YAge8Me9RFnI77Lx+UTkgm4rSVM3VPVdS/GsUw==", + "hasInstallScript": true, + "dependencies": { + "@discordjs/node-pre-gyp": "^0.4.0", + "node-addon-api": "^3.2.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@discordjs/voice": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.6.0.tgz", + "integrity": "sha512-DF2fZAnB8gX3Qz5BEWPOUl565ptpda1uVmXJije4iK5aQrECfkqc6XcI+wzbGaNvzsH1Wb76NPzxngsEw8bblw==", + "dependencies": { + "@types/ws": "^7.4.4", + "discord-api-types": "^0.22.0", + "prism-media": "^1.3.1", + "tiny-typed-emitter": "^2.0.3", + "ws": "^7.4.4" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@sapphire/async-queue": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz", + "integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==", + "engines": { + "node": ">=14", + "npm": ">=6" + } + }, + "node_modules/@sindresorhus/is": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", + "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@types/node": { + "version": "16.4.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.13.tgz", + "integrity": "sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg==" + }, + "node_modules/@types/node-fetch": { + "version": "2.5.12", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", + "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-escape-sequences": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-5.1.2.tgz", + "integrity": "sha512-JcpoVp1W1bl1Qn4cVuiXEhD6+dyXKSOgCn2zlzE8inYgCJCBy1aPnUhlz6I4DFum8D4ovb9Qi/iAjUcGvG2lqw==", + "dependencies": { + "array-back": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "node_modules/are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/array-back": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", + "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.1.tgz", + "integrity": "sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==" + }, + "node_modules/async.parallellimit": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.parallellimit/-/async.parallellimit-0.5.2.tgz", + "integrity": "sha1-v9y/Lwgy8f/0wLM1S09jIGY91R8=", + "dependencies": { + "async.util.eachoflimit": "0.5.2", + "async.util.parallel": "0.5.2" + } + }, + "node_modules/async.util.eachoflimit": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.eachoflimit/-/async.util.eachoflimit-0.5.2.tgz", + "integrity": "sha1-i4y4z7AniqXOtQqPgAwcJmjbV+8=", + "dependencies": { + "async.util.keyiterator": "0.5.2", + "async.util.noop": "0.5.2", + "async.util.once": "0.5.2", + "async.util.onlyonce": "0.5.2" + } + }, + "node_modules/async.util.isarray": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.isarray/-/async.util.isarray-0.5.2.tgz", + "integrity": "sha1-5i2sjyY29lh13PdSHC0k0N+yu98=" + }, + "node_modules/async.util.isarraylike": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.isarraylike/-/async.util.isarraylike-0.5.2.tgz", + "integrity": "sha1-jn+H2pFB8vCZboBAR30NTv4/UPg=", + "dependencies": { + "async.util.isarray": "0.5.2" + } + }, + "node_modules/async.util.keyiterator": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.keyiterator/-/async.util.keyiterator-0.5.2.tgz", + "integrity": "sha1-M55s6PidAAQz+3gU4ico8/F1CQ0=", + "dependencies": { + "async.util.isarraylike": "0.5.2", + "async.util.keys": "0.5.2" + } + }, + "node_modules/async.util.keys": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.keys/-/async.util.keys-0.5.2.tgz", + "integrity": "sha1-XDTd2KPtt6eIPJtf4hJngbIJivY=" + }, + "node_modules/async.util.noop": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.noop/-/async.util.noop-0.5.2.tgz", + "integrity": "sha1-vdYrl8sKo/YLWGrRSEaGmJdeWLk=" + }, + "node_modules/async.util.once": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.once/-/async.util.once-0.5.2.tgz", + "integrity": "sha1-FFPLdATK0IImlPq6vEepblyqchY=" + }, + "node_modules/async.util.onlyonce": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.onlyonce/-/async.util.onlyonce-0.5.2.tgz", + "integrity": "sha1-uOb8AErckjFk154y8oE+5GXCT/I=" + }, + "node_modules/async.util.parallel": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.parallel/-/async.util.parallel-0.5.2.tgz", + "integrity": "sha1-IzUk49b6/9XplddUdrjZJPloCM0=", + "dependencies": { + "async.util.isarraylike": "0.5.2", + "async.util.noop": "0.5.2", + "async.util.restparam": "0.5.2" + } + }, + "node_modules/async.util.restparam": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/async.util.restparam/-/async.util.restparam-0.5.2.tgz", + "integrity": "sha1-A+/r88Ane5ciDlJaunUPXgT8gM0=" + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + }, + "node_modules/boolstring": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/boolstring/-/boolstring-1.0.2.tgz", + "integrity": "sha512-0JLNSmZUv1m/O8sVayFm2t0naiOXwQ9O2Gq9u1eoIkhvu6U5NQER/e3k4BGpjZ33G775lWMT7TzJ7r5VtmEnbQ==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cheerio": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.22.0.tgz", + "integrity": "sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=", + "dependencies": { + "css-select": "~1.2.0", + "dom-serializer": "~0.1.0", + "entities": "~1.1.1", + "htmlparser2": "^3.9.1", + "lodash.assignin": "^4.0.9", + "lodash.bind": "^4.1.4", + "lodash.defaults": "^4.0.1", + "lodash.filter": "^4.4.0", + "lodash.flatten": "^4.2.0", + "lodash.foreach": "^4.3.0", + "lodash.map": "^4.4.0", + "lodash.merge": "^4.4.0", + "lodash.pick": "^4.2.1", + "lodash.reduce": "^4.4.0", + "lodash.reject": "^4.4.0", + "lodash.some": "^4.4.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/cli-color": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.2.0.tgz", + "integrity": "sha1-OlrnT9drYmevZm5p4q+70B3vNNE=", + "dependencies": { + "ansi-regex": "^2.1.1", + "d": "1", + "es5-ext": "^0.10.12", + "es6-iterator": "2", + "memoizee": "^0.4.3", + "timers-ext": "0.1" + } + }, + "node_modules/cli-progress": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.9.0.tgz", + "integrity": "sha512-g7rLWfhAo/7pF+a/STFH/xPyosaL1zgADhI0OM83hl3c7S43iGvJWEAV2QuDOnQ8i6EMBj/u4+NTd0d5L+4JfA==", + "dependencies": { + "colors": "^1.1.2", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-progress/node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress/node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-progress/node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "node_modules/css-select": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", + "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "dependencies": { + "boolbase": "~1.0.0", + "css-what": "2.1", + "domutils": "1.5.1", + "nth-check": "~1.0.1" + } + }, + "node_modules/css-what": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", + "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", + "engines": { + "node": "*" + } + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/dasu": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/dasu/-/dasu-0.4.1.tgz", + "integrity": "sha512-+fDXmFqrsZfuCr3dwSxm0pyK5RTiIBFBJiWTG6HaZQc9FhoqT4o9KQFEfGllic0S2gEpzHYMirzqJ5qSh+mOrQ==" + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/discord-api-types": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz", + "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==", + "engines": { + "node": ">=12" + } + }, + "node_modules/discord.js": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.0.1.tgz", + "integrity": "sha512-pEODCFfxypBnGEYpSgjkn1jt70raCS1um7Zp0AXEfW1DcR29wISzQ/WeWdnjP5KTXGi0LTtkRiUjOsMgSoukxA==", + "dependencies": { + "@discordjs/builders": "^0.4.0", + "@discordjs/collection": "^0.2.1", + "@discordjs/form-data": "^3.0.1", + "@sapphire/async-queue": "^1.1.4", + "@types/ws": "^7.4.7", + "discord-api-types": "^0.22.0", + "node-fetch": "^2.6.1", + "ws": "^7.5.1" + }, + "engines": { + "node": ">=16.6.0", + "npm": ">=7.0.0" + } + }, + "node_modules/discord.js/node_modules/@discordjs/collection": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz", + "integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", + "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "dependencies": { + "domelementtype": "^1.3.0", + "entities": "^1.1.1" + } + }, + "node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + }, + "node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/dot-prop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", + "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotenv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", + "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "node_modules/es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dependencies": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dependencies": { + "type": "^2.0.0" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" + }, + "node_modules/fluent-ffmpeg": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz", + "integrity": "sha1-yVLeIkD4EuvaCqgAbXd27irPfXQ=", + "dependencies": { + "async": ">=0.2.9", + "which": "^1.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "node_modules/hash-arg": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/hash-arg/-/hash-arg-1.0.3.tgz", + "integrity": "sha512-BUvgqsnHlEupirIUo/pyaeodQ4gEP4b5aC/HgOvQcy7MMOhXrQjImcM+jupDNwBZDLxXpD04CufZQN32g1LdfQ==", + "engines": { + "node": ">=8.17.0", + "npm": ">=6.13.4" + } + }, + "node_modules/homedir": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/homedir/-/homedir-0.6.0.tgz", + "integrity": "sha1-KyHbZr8Ipts4JJo+/1LX0YcGrx4=" + }, + "node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/htmlparser2/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/human-time": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/human-time/-/human-time-0.0.2.tgz", + "integrity": "sha512-sbYI90YhYmstslPTb70BLGjy6mdESa0lxL7uDR4fIVAx9Iobz8fLEqi7FqF4Q/6vblrzZALg//MsYJlIPBU8SA==" + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/jsonpath-plus": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.0.4.tgz", + "integrity": "sha512-w3pI3PewtwIrrGRCFvTkCkKu8IrOwjsqoYRxvxuXQjPB0udEtAuBY0B6/SEztsxMmuIHVHGFQ0knVnTCPW9qYw==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/keypress": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.2.1.tgz", + "integrity": "sha1-HoBFQlABjbrUw/6USX1uZ7YmnHc=" + }, + "node_modules/list-it": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/list-it/-/list-it-1.3.7.tgz", + "integrity": "sha512-a75ZgJGoGfHM6wo+tW8DFoMSm24pq1cJkZkvbzjZ/rpfe3a0djdgOoEd8MlgDeioBiCscZnvfL97gcR22xb+Vw==", + "dependencies": { + "ansi-escape-sequences": "^5.1.2", + "debug": "^4.2.0", + "eastasianwidth": "^0.2.0", + "hash-arg": "^1.0.3", + "node-getopt": "^0.3.2" + }, + "bin": { + "listit": "bin/listit.js" + } + }, + "node_modules/lodash.assignin": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assignin/-/lodash.assignin-4.2.0.tgz", + "integrity": "sha1-uo31+4QesKPoBEIysOJjqNxqKKI=" + }, + "node_modules/lodash.bind": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/lodash.bind/-/lodash.bind-4.2.1.tgz", + "integrity": "sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=" + }, + "node_modules/lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" + }, + "node_modules/lodash.filter": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz", + "integrity": "sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=" + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=" + }, + "node_modules/lodash.foreach": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", + "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, + "node_modules/lodash.map": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", + "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=" + }, + "node_modules/lodash.reduce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz", + "integrity": "sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=" + }, + "node_modules/lodash.reject": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.reject/-/lodash.reject-4.6.0.tgz", + "integrity": "sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=" + }, + "node_modules/lodash.some": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", + "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=" + }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=" + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/m3u8stream": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/m3u8stream/-/m3u8stream-0.8.3.tgz", + "integrity": "sha512-0nAcdrF8YJKUkb6PzWdvGftTPyCVWgoiot1AkNVbPKTeIGsWs6DrOjifrJ0Zi8WQfQmD2SuVCjkYIOip12igng==", + "dependencies": { + "miniget": "^4.0.0", + "sax": "^1.2.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/memoizee/node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + }, + "node_modules/mime-db": { + "version": "1.46.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", + "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.29", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", + "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "dependencies": { + "mime-db": "1.46.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/miniget": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/miniget/-/miniget-4.2.0.tgz", + "integrity": "sha512-IzTOaNgBw/qEpzkPTE7X2cUVXQfSKbG8w52Emi93zb+Zya2ZFrbmavpixzebuDJD9Ku4ecbaFlC7Y1cEESzQtQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-fzf": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/node-fzf/-/node-fzf-0.5.3.tgz", + "integrity": "sha512-crN8rRfApu/GUrtKq+zJ6LueUyNAOJpFHxoT2Ru1Q+OYRa/F/H7CXvzcMrFc7D964yakYZEZ9XR3YbdSHXgyCw==", + "dependencies": { + "cli-color": "~1.2.0", + "keypress": "~0.2.1", + "minimist": "~1.2.0", + "redstar": "0.0.2", + "string-width": "~2.1.1", + "ttys": "0.0.3" + }, + "bin": { + "nfzf": "bin/cli.js" + } + }, + "node_modules/node-fzf/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "engines": { + "node": ">=4" + } + }, + "node_modules/node-fzf/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "engines": { + "node": ">=4" + } + }, + "node_modules/node-fzf/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/node-fzf/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/node-getopt": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/node-getopt/-/node-getopt-0.3.2.tgz", + "integrity": "sha512-yqkmYrMbK1wPrfz7mgeYvA4tBperLg9FQ4S3Sau3nSAkpOA0x0zC8nQ1siBwozy1f4SE8vq2n1WKv99r+PCa1Q==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dependencies": { + "boolbase": "~1.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/ow": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", + "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", + "dependencies": { + "@sindresorhus/is": "^4.0.1", + "callsites": "^3.1.0", + "dot-prop": "^6.0.1", + "lodash.isequal": "^4.5.0", + "type-fest": "^1.2.1", + "vali-date": "^1.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prism-media": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.2.tgz", + "integrity": "sha512-L6UsGHcT6i4wrQhFF1aPK+MNYgjRqR2tUoIqEY+CG1NqVkMjPRKzS37j9f8GiYPlD6wG9ruBj+q5Ax+bH8Ik1g==", + "peerDependencies": { + "@discordjs/opus": "^0.5.0", + "ffmpeg-static": "^4.2.7 || ^3.0.0 || ^2.4.0", + "node-opus": "^0.3.3", + "opusscript": "^0.0.8" + }, + "peerDependenciesMeta": { + "@discordjs/opus": { + "optional": true + }, + "ffmpeg-static": { + "optional": true + }, + "node-opus": { + "optional": true + }, + "opusscript": { + "optional": true + } + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/redstar": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/redstar/-/redstar-0.0.2.tgz", + "integrity": "sha1-nVammAY4yYUaEAsMs799PrkCBcs=", + "dependencies": { + "minimatch": "~3.0.4" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/sanitize-filename": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", + "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", + "dependencies": { + "truncate-utf8-bytes": "^1.0.0" + } + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "node_modules/streamspeed": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/streamspeed/-/streamspeed-2.0.1.tgz", + "integrity": "sha512-j6pFynhO0nZ+1zhyTDqLLlIxM0IyCdLKMj1EUJznDA87xLE/JWSwEg3FlJWERDB72KYt5OD29ZUWxxVkMTnqWg==", + "engines": { + "node": ">=10" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.6.tgz", + "integrity": "sha512-oaWyu5dQbHaYcyZCTfyPpC+VmI62/OM2RTUYavTk1MDr1cwW5Boi3baeYQKiZbY2uSQJGr+iMOzb/JFxLrft+g==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "node_modules/tiny-typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz", + "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==" + }, + "node_modules/truncate-utf8-bytes": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", + "integrity": "sha1-QFkjkJWS1W94pYGENLC3hInKXys=", + "dependencies": { + "utf8-byte-length": "^1.0.1" + } + }, + "node_modules/ts-mixer": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz", + "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==" + }, + "node_modules/tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, + "node_modules/ttys": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/ttys/-/ttys-0.0.3.tgz", + "integrity": "sha1-FbrN54MQIN5fLyjwGxcy7wNlH00=", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" + }, + "node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/utf8-byte-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", + "integrity": "sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/ws": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yt-search": { + "version": "2.7.5", + "resolved": "https://registry.npmjs.org/yt-search/-/yt-search-2.7.5.tgz", + "integrity": "sha512-+5rZmv4tSY22C7OzFiX+TrTIMug28OBMFF7l7roB+LDY2bIUS5lizewrsWKVZd2U+aF9ge9sGxgRwmnQmFVEiA==", + "dependencies": { + "async.parallellimit": "~0.5.2", + "boolstring": "~1.0.2", + "cheerio": "~0.22.0", + "dasu": "~0.4.1", + "human-time": "0.0.2", + "jsonpath-plus": "~5.0.2", + "minimist": "~1.2.5", + "node-fzf": "~0.5.1" + }, + "bin": { + "yt-search": "bin/cli.js", + "yt-search-audio": "bin/mpv_audio.sh", + "yt-search-video": "bin/mpv_video.sh" + } + }, + "node_modules/ytdl": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/ytdl/-/ytdl-1.4.1.tgz", + "integrity": "sha512-YJS9zRRS7Goq3yBx4jt6pk1w0CPjAaTzYX49/BEDtP4aSsF92cQTkDdA6893AjS0adEvpH79gvXUOx6K959sBw==", + "dependencies": { + "chalk": "^4.0.0", + "cli-progress": "^3.8.2", + "commander": "^6.1.0", + "homedir": "^0.6.0", + "list-it": "^1.3.3", + "lodash.throttle": "^4.1.1", + "sanitize-filename": "^1.6.3", + "streamspeed": "^2.0.1", + "ytdl-core": "^4.1.0" + }, + "bin": { + "ytdl": "bin/ytdl.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ytdl-core": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.9.1.tgz", + "integrity": "sha512-6Jbp5RDhUEozlaJQAR+l8oV8AHsx3WUXxSyPxzE6wOIAaLql7Hjiy0ZM58wZoyj1YEenlEPjEqcJIjKYKxvHtQ==", + "dependencies": { + "m3u8stream": "^0.8.3", + "miniget": "^4.0.0", + "sax": "^1.1.3" + }, + "engines": { + "node": ">=10" + } + } + }, "dependencies": { - "@discordjs/collection": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.1.6.tgz", - "integrity": "sha512-utRNxnd9kSS2qhyivo9lMlt5qgAUasH2gb7BEOn6p0efFh24gjGomHzWKMAPn2hEReOPQZCJaRKoURwRotKucQ==" + "@discordjs/builders": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.4.0.tgz", + "integrity": "sha512-EiwLltKph6TSaPJIzJYdzNc1PnA2ZNaaE0t0ODg3ghnpVHqfgd0YX9/srsleYHW2cw1sfIq+kbM+h0etf7GWLA==", + "requires": { + "@sindresorhus/is": "^4.0.1", + "discord-api-types": "^0.22.0", + "ow": "^0.27.0", + "ts-mixer": "^6.0.0", + "tslib": "^2.3.0" + } }, "@discordjs/form-data": { "version": "3.0.1", @@ -20,27 +1747,72 @@ } }, "@discordjs/node-pre-gyp": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.2.0.tgz", - "integrity": "sha512-2PIodKAuDLZZ8LGVFiQkZicco9PGcUICU/NlMqNMXuy91qMGKosOkDkzj4x+Kl1WYR1r2Y/fyOIgje5zezavYQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.0.tgz", + "integrity": "sha512-CXLpoM2hgS94i9+EAVowR92y8o3KdKc9fmoe8/FTp5XTzvoXzJln3+Ctl0oBpE6c9+11zd9oJnZPdkkOBkDPSA==", "requires": { "detect-libc": "^1.0.3", - "mkdirp": "^0.5.5", - "needle": "^2.6.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.1", "nopt": "^5.0.0", "npmlog": "^4.1.2", - "rc": "^1.2.8", "rimraf": "^3.0.2", - "semver": "^7.3.4", + "semver": "^7.3.5", "tar": "^6.1.0" } }, "@discordjs/opus": { - "version": "github:discordjs/opus#49756e83ed27650f6c5dc5d4ae9cf4cf5eb5ea38", - "from": "github:discordjs/opus", + "version": "git+ssh://git@github.com/discordjs/opus.git#d929bdb7574fbf3ad1cea9c96277ab3fc4b96132", + "from": "@discordjs/opus@github:discordjs/opus", "requires": { - "@discordjs/node-pre-gyp": "^0.2.0", - "node-addon-api": "^3.1.0" + "@discordjs/node-pre-gyp": "^0.4.0", + "node-addon-api": "^3.2.1" + } + }, + "@discordjs/voice": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.6.0.tgz", + "integrity": "sha512-DF2fZAnB8gX3Qz5BEWPOUl565ptpda1uVmXJije4iK5aQrECfkqc6XcI+wzbGaNvzsH1Wb76NPzxngsEw8bblw==", + "requires": { + "@types/ws": "^7.4.4", + "discord-api-types": "^0.22.0", + "prism-media": "^1.3.1", + "tiny-typed-emitter": "^2.0.3", + "ws": "^7.4.4" + } + }, + "@sapphire/async-queue": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.4.tgz", + "integrity": "sha512-fFrlF/uWpGOX5djw5Mu2Hnnrunao75WGey0sP0J3jnhmrJ5TAPzHYOmytD5iN/+pMxS+f+u/gezqHa9tPhRHEA==" + }, + "@sindresorhus/is": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", + "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" + }, + "@types/node": { + "version": "16.4.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.4.13.tgz", + "integrity": "sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg==" + }, + "@types/node-fetch": { + "version": "2.5.12", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", + "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", + "dev": true, + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "requires": { + "@types/node": "*" } }, "abbrev": { @@ -48,12 +1820,12 @@ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "requires": { - "event-target-shim": "^5.0.0" + "debug": "4" } }, "ansi-escape-sequences": { @@ -96,6 +1868,11 @@ "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==" }, + "async": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.1.tgz", + "integrity": "sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==" + }, "async.parallellimit": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/async.parallellimit/-/async.parallellimit-0.5.2.tgz", @@ -202,6 +1979,11 @@ "concat-map": "0.0.1" } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -373,18 +2155,13 @@ "integrity": "sha512-+fDXmFqrsZfuCr3dwSxm0pyK5RTiIBFBJiWTG6HaZQc9FhoqT4o9KQFEfGllic0S2gEpzHYMirzqJ5qSh+mOrQ==" }, "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -400,19 +2177,31 @@ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, + "discord-api-types": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz", + "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==" + }, "discord.js": { - "version": "12.5.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-12.5.1.tgz", - "integrity": "sha512-VwZkVaUAIOB9mKdca0I5MefPMTQJTNg0qdgi1huF3iwsFwJ0L5s/Y69AQe+iPmjuV6j9rtKoG0Ta0n9vgEIL6w==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.0.1.tgz", + "integrity": "sha512-pEODCFfxypBnGEYpSgjkn1jt70raCS1um7Zp0AXEfW1DcR29wISzQ/WeWdnjP5KTXGi0LTtkRiUjOsMgSoukxA==", "requires": { - "@discordjs/collection": "^0.1.6", + "@discordjs/builders": "^0.4.0", + "@discordjs/collection": "^0.2.1", "@discordjs/form-data": "^3.0.1", - "abort-controller": "^3.0.0", + "@sapphire/async-queue": "^1.1.4", + "@types/ws": "^7.4.7", + "discord-api-types": "^0.22.0", "node-fetch": "^2.6.1", - "prism-media": "^1.2.2", - "setimmediate": "^1.0.5", - "tweetnacl": "^1.0.3", - "ws": "^7.3.1" + "ws": "^7.5.1" + }, + "dependencies": { + "@discordjs/collection": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.1.tgz", + "integrity": "sha512-vhxqzzM8gkomw0TYRF3tgx7SwElzUlXT/Aa41O7mOcyN6wIJfj5JmDWaO5XGKsGSsNx7F3i5oIlrucCCWV1Nog==" + } } }, "dom-serializer": { @@ -446,16 +2235,19 @@ "domelementtype": "1" } }, + "dot-prop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", + "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "requires": { + "is-obj": "^2.0.0" + } + }, "dotenv": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz", "integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==" }, - "download-file-sync": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/download-file-sync/-/download-file-sync-1.0.4.tgz", - "integrity": "sha1-0+PFQ/g29BA5RVuQNMcuNVsDYBk=" - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -520,11 +2312,6 @@ "es5-ext": "~0.10.14" } }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" - }, "ext": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", @@ -540,6 +2327,26 @@ } } }, + "fluent-ffmpeg": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz", + "integrity": "sha1-yVLeIkD4EuvaCqgAbXd27irPfXQ=", + "requires": { + "async": ">=0.2.9", + "which": "^1.1.1" + } + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -569,9 +2376,9 @@ } }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -626,19 +2433,20 @@ } } }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, "human-time": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/human-time/-/human-time-0.0.2.tgz", "integrity": "sha512-sbYI90YhYmstslPTb70BLGjy6mdESa0lxL7uDR4fIVAx9Iobz8fLEqi7FqF4Q/6vblrzZALg//MsYJlIPBU8SA==" }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -653,11 +2461,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", @@ -666,6 +2469,11 @@ "number-is-nan": "^1.0.0" } }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + }, "is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", @@ -676,6 +2484,11 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, "jsonpath-plus": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-5.0.4.tgz", @@ -696,21 +2509,6 @@ "eastasianwidth": "^0.2.0", "hash-arg": "^1.0.3", "node-getopt": "^0.3.2" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } } }, "lodash.assignin": { @@ -743,6 +2541,11 @@ "resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz", "integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=" }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "lodash.map": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", @@ -803,6 +2606,21 @@ "sax": "^1.2.4" } }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, "memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -874,27 +2692,14 @@ } }, "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "needle": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz", - "integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==", - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "next-tick": { "version": "1.0.0", @@ -902,9 +2707,9 @@ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, "node-addon-api": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz", - "integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node-fetch": { "version": "2.6.1", @@ -1003,32 +2808,35 @@ "wrappy": "1" } }, + "ow": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz", + "integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==", + "requires": { + "@sindresorhus/is": "^4.0.1", + "callsites": "^3.1.0", + "dot-prop": "^6.0.1", + "lodash.isequal": "^4.5.0", + "type-fest": "^1.2.1", + "vali-date": "^1.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "prism-media": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.2.8.tgz", - "integrity": "sha512-bJ8J9PKpUdG6GmtnlaPSi2cMdGDLsS9o4iOlOncJasku73uJucgcN9Yr7/jlENqfh7hoR6LDqPr17JEzp6srjg==" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.2.tgz", + "integrity": "sha512-L6UsGHcT6i4wrQhFF1aPK+MNYgjRqR2tUoIqEY+CG1NqVkMjPRKzS37j9f8GiYPlD6wG9ruBj+q5Ax+bH8Ik1g==", + "requires": {} }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, "readable-stream": { "version": "2.3.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", @@ -1064,11 +2872,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, "sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", @@ -1083,9 +2886,9 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "requires": { "lru-cache": "^6.0.0" } @@ -1095,11 +2898,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -1110,6 +2908,14 @@ "resolved": "https://registry.npmjs.org/streamspeed/-/streamspeed-2.0.1.tgz", "integrity": "sha512-j6pFynhO0nZ+1zhyTDqLLlIxM0IyCdLKMj1EUJznDA87xLE/JWSwEg3FlJWERDB72KYt5OD29ZUWxxVkMTnqWg==" }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -1120,14 +2926,6 @@ "strip-ansi": "^3.0.0" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -1136,11 +2934,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -1150,9 +2943,9 @@ } }, "tar": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", - "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", + "version": "6.1.6", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.6.tgz", + "integrity": "sha512-oaWyu5dQbHaYcyZCTfyPpC+VmI62/OM2RTUYavTk1MDr1cwW5Boi3baeYQKiZbY2uSQJGr+iMOzb/JFxLrft+g==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -1160,13 +2953,6 @@ "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" - }, - "dependencies": { - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - } } }, "timers-ext": { @@ -1178,6 +2964,11 @@ "next-tick": "1" } }, + "tiny-typed-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-typed-emitter/-/tiny-typed-emitter-2.1.0.tgz", + "integrity": "sha512-qVtvMxeXbVej0cQWKqVSSAHmKZEHAvxdF8HEUBFWts8h+xEo5m/lEiPakuyZ3BnCBjOD8i24kzNOiOLLgsSxhA==" + }, "truncate-utf8-bytes": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz", @@ -1186,6 +2977,16 @@ "utf8-byte-length": "^1.0.1" } }, + "ts-mixer": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz", + "integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ==" + }, + "tslib": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", + "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==" + }, "ttys": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/ttys/-/ttys-0.0.3.tgz", @@ -1201,6 +3002,11 @@ "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==" }, + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + }, "utf8-byte-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz", @@ -1211,6 +3017,19 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "vali-date": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz", + "integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, "wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", @@ -1227,7 +3046,8 @@ "ws": { "version": "7.5.3", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "requires": {} }, "yallist": { "version": "4.0.0", @@ -1266,9 +3086,9 @@ } }, "ytdl-core": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.9.0.tgz", - "integrity": "sha512-pfuWqEIrP3iYqz5jOMmaz9m+DAzfQpt8X1jmzoOsPdYWrLMV4ml7+p/zhDi0F8IF90i4Jmd0Pq0W1awnKDatKg==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/ytdl-core/-/ytdl-core-4.9.1.tgz", + "integrity": "sha512-6Jbp5RDhUEozlaJQAR+l8oV8AHsx3WUXxSyPxzE6wOIAaLql7Hjiy0ZM58wZoyj1YEenlEPjEqcJIjKYKxvHtQ==", "requires": { "m3u8stream": "^0.8.3", "miniget": "^4.0.0", diff --git a/package.json b/package.json index b687311..9f72ce9 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,31 @@ { "name": "denim_3001", - "version": "3001.20", + "version": "3001.21.0", "description": "Toto je velmi kvalitní bot.", "repository": { "url": "https://github.com/Histmy/Denim-Bot/" }, - "main": "app.js", + "main": "out/app.js", "scripts": { - "start": "node ." + "start": "node .", + "test": "tsc && node ." }, "author": "Histmy + det-fys", "license": "ISC", "dependencies": { "@discordjs/opus": "github:discordjs/opus", - "discord.js": "^12.4.1", + "@discordjs/voice": "^0.6.0", + "discord.js": "^13.0.1", "dotenv": "^8.2.0", - "download-file-sync": "^1.0.4", + "fluent-ffmpeg": "^2.1.2", "node-fetch": "^2.6.1", + "prism-media": "^1.3.2", + "tweetnacl": "^1.0.3", "yt-search": "^2.7.5", "ytdl": "^1.4.1", - "ytdl-core": "^4.9.0" + "ytdl-core": "^4.9.1" + }, + "devDependencies": { + "@types/node-fetch": "^2.5.12" } } diff --git a/src/app.ts b/src/app.ts new file mode 100644 index 0000000..24c2422 --- /dev/null +++ b/src/app.ts @@ -0,0 +1,109 @@ +import { getVoiceConnections } from "@discordjs/voice"; +import { Client, Intents, Message } from "discord.js"; +import { config } from "dotenv"; +import { readdirSync } from "fs"; +import { emouty } from "./utils/emotes"; +import { Komand, ListenerFunkce, Modul } from "./utils/types"; +import { formatCas } from "./utils/utils.js"; + +const ints = Intents.FLAGS; +const client = new Client({ intents: [ints.GUILDS, ints.GUILD_VOICE_STATES, ints.GUILD_PRESENCES, ints.GUILD_MESSAGES] }); +config(); + +const prefix = process.env.PREFIX || "more"; +const modulFolder = `${__dirname}/modules/`; +const eventy: Record = { on_message: [] }; +const komandy: Record = {}; +const aliasy: Record = {}; +let spink = false; +const kuldan_log: Record> = {}; + +const runEvent = (name: string, args: any[]) => { + eventy[name].forEach(listener => { + listener(...args); + }); +}; + +readdirSync(modulFolder).forEach(soubor => { + if (!soubor.endsWith(".js")) return; + const modul: Modul = require(`${modulFolder}${soubor}`); + console.log(`Načet sem: ${modulFolder}${soubor}`); + modul.client = client; + Object.keys(modul).forEach(name => { + if (name.startsWith("on_")) { + if (!eventy[name]) { + eventy[name] = []; + if (name !== "on_message") client.on(name.slice(3), (...args) => runEvent(name, args)); + } + eventy[name].push(modul[name]); + } else if (name === "more_komandy") { + Object.keys(modul[name]).forEach(cmdName => { + const value = modul[name][cmdName]; + if (typeof value !== "object") { + komandy[cmdName] = { run: value }; + } else { + komandy[cmdName] = { run: value.run, cd: value.cd }; + value.als?.forEach(al => aliasy[al] = cmdName); + } + }); + } + }); +}); + +const spim = (mes: Message) => { + const cont = mes.content.toLocaleLowerCase(); + if (cont === `${prefix} zapni se`) { + if (spink) { + spink = false; + mes.client.user?.setStatus("online"); + mes.channel.send("dobré ráno magoří"); + } + else mes.channel.send("tak jsi kokot?"); + } else if (!spink) { + if (cont === `${prefix} vypni se`) { + mes.react(emouty.purfieRIP); + getVoiceConnections().forEach(con => con.disconnect()); + mes.client.user?.setStatus("invisible"); + spink = true; + } + else return false; + } + return true; +}; + +const maKuldan = (id: string, komand: string, kuldan_komandu: number) => { + if (!kuldan_log[komand]) kuldan_log[komand] = {}; + + const cas_ted = Date.now() / 1000; + const rozdil = cas_ted - kuldan_log[komand][id]; + if (rozdil < kuldan_komandu) return kuldan_komandu - rozdil; + + kuldan_log[komand][id] = cas_ted; + return 0; +}; + +client.on("messageCreate", mes => { + if (process.env.IGNORE_MESS || spim(mes)) return; + + runEvent("on_message", [mes]); + const [mes_prefix, komand, ...args] = mes.content.split(" "); + if (mes_prefix.toLowerCase() !== prefix) return; + if (!komand) return void mes.channel.send("coe voe"); + + const celArgs = args.join(" "); + const cmdName = aliasy[komand] ?? komand; + const cmd = komandy[cmdName]; + if (!cmd) return void mes.channel.send("co to znamena ti gadzovko"); + + if (cmd.cd) { + const zbyva = Math.round(maKuldan(mes.author.id, cmdName, cmd.cd)); + if (zbyva) return void mes.channel.send(`si kkt vole maz kuldan jeste ${formatCas(zbyva)}`); + } + + const akce = cmd.run; + if (typeof akce === "string") return void mes.channel.send(akce); + const result = akce(celArgs, mes); + if (result && !(result instanceof Promise)) mes.channel.send(result); +}); + +client.login(process.env.TOKEN); diff --git a/src/modules/komArgs.ts b/src/modules/komArgs.ts new file mode 100644 index 0000000..6f31e37 --- /dev/null +++ b/src/modules/komArgs.ts @@ -0,0 +1,42 @@ +// Komandy, který pošlou jenom celArgs a random hovno +import { Message } from "discord.js"; +import { emouty } from "../utils/emotes"; + +module.exports = { + more_komandy: { + + rekni: (arg: string, mes: Message) => { + if (mes.author.bot) return "ne"; + const corict = arg ?? "co mam jako rict"; + mes.delete(); + return corict; + }, + + clap: (arg: string, mes: Message) => { + mes.delete(); + return `${arg} ${emouty.clap}`; + }, + + clap2: (arg: string, mes: Message) => { + mes.delete(); + return `${emouty.clap2} ${arg}`; + }, + + voliz: { + als: ["voliž"], + run: (arg: string, mes: Message) => { + mes.delete(); + return `${emouty.lickL}${arg}${emouty.lickR}`; + } + }, + + pozdrav: (arg: string) => `zdravim ${arg}`, + + zhejti: (arg: string) => `${arg} je pycovina zasrana vimrdana`, + + uraz: { + als: ["uraž"], + run: (arg: string) => `${arg} , u suck` + } + } +}; diff --git a/src/modules/komComplex.ts b/src/modules/komComplex.ts new file mode 100644 index 0000000..3f38b83 --- /dev/null +++ b/src/modules/komComplex.ts @@ -0,0 +1,127 @@ +// Komandy, který buď nějakým způsobem mění funkci nebo "vzhled" bota +// nebo donutí bota něco udělat (odeslání zprávy nebo smazání originální zprávy se nepočítá) + +import { ActivityType, Message, PresenceStatusData } from "discord.js"; +import { emouty } from "../utils/emotes"; + +const changeStatus = (mes: Message, status: PresenceStatusData) => { + mes.client.user?.setStatus(status); + return "ano pane"; +}; + +const changeActivity = (mes: Message, activity: ActivityType | undefined = undefined, txt: string = "") => { + mes.client.user?.setActivity({ name: txt, type: activity }); + mes.react(emouty.d3k); + return "ano pane"; +}; + +const ping = /^<@!?\d+>$/; + +module.exports = { + more_komandy: { + + online: { + als: ["onlajn", "zelenej"], + run: (_: any, mes: Message) => changeStatus(mes, "online") + }, + idle: { + als: ["žlutej", "zlutej", "afk", "idle", "nepřítomnej", "nepritomnej"], + run: (_: any, mes: Message) => changeStatus(mes, "idle") + }, + dnd: { + als: ["nerusit", "nerušit", "červenej", "cervenej"], + run: (_: any, mes: Message) => changeStatus(mes, "dnd") + }, + offline: { + als: ["oflajn", "neviditelnej"], + run: (_: any, mes: Message) => changeStatus(mes, "invisible") + }, + + hraj: (arg: string, mes: Message) => changeActivity(mes, "PLAYING", arg), + sleduj: (arg: string, mes: Message) => changeActivity(mes, "WATCHING", arg), + poslouchej: (arg: string, mes: Message) => changeActivity(mes, "LISTENING", arg), + soutez: { + als: ["soutěž"], + run: (arg: string, mes: Message) => changeActivity(mes, "COMPETING", arg) + }, + nedelej: (_: any, mes: Message) => changeActivity(mes), + + fight: { + als: ["figh", "fajt"], + run: (arg: string, mes: Message) => { + if (!ping.test(arg)) return "tak si kokot ti kokote"; + + const vyherce = Math.random() < 0.5 ? mes.author : arg; + return `tento figh vyhrál: ${vyherce}!`; + } + }, + + status: (arg: string, mes: Message) => { + if (!ping.test(arg)) return "tak si kokot ti kokote"; + + const uzivatel = mes.mentions.members!.first()!; + const embed = { + title: `Informace o statusech pro ${uzivatel.displayName}:`, + color: 431075, + description: "" + }; + const presence = uzivatel.presence?.clientStatus; + if (!(presence && Object.keys(presence).length)) { + embed.description = "*Všude je offline*"; + } else { + const zarizeni: Record = { desktop: "Počítač", mobile: "Mobil", web: "Web" }; + const statusy = { online: "🟢", idle: "🟡", dnd: "🔴" }; + const uStatusy: string[] = []; + const klice = Object.keys(presence) as ("web" | "mobile" | "desktop")[]; + klice.forEach(status => { + uStatusy.push(`${zarizeni[status]}: ${statusy[presence[status]!]}`); + }); + embed.description = uStatusy.join("\n"); + } + return { embeds: [embed] }; + }, + + zareaguj: { + als: ["react"], + run: (arg: string, mes: Message) => { + if (!arg) return "retard"; + + const emouty = arg.match(//g); + if (!emouty) return "retard"; + + let naCo: Message; + (async () => { + if (mes.reference) { + naCo = await mes.channel.messages.fetch(mes.reference.messageId!); + } else { + const msgs = [...mes.channel.messages.cache.values()]; + naCo = msgs[msgs.length - 2]; + } + + mes.delete(); + emouty.forEach(emout => naCo.react(emout)); + })(); + } + }, + + odpocitej: (_: any, mes: Message) => { + const randomshit = (mes: Message, argument: string[]) => { + mes.edit(argument[0]); + argument.splice(0, 1); + if (argument.length) setTimeout(() => randomshit(mes, argument), 1000); + }; + mes.channel.send(":stop_button:").then(mes => randomshit(mes, [":five:", ":four:", ":three:", ":two:", ":one:", ":ok:"])); + }, + + pocasi: { + als: ["počasí"], + run: (_: any) => { + const embed = { + title: "Počasí", + image: { url: "attachment://pocasi.png" } + }; + return { embeds: [embed], files: ["https://util.deadfish.cz/morepocasi/v/49.4348358/12.8147250/pocasi.png"] }; + } + } + } +}; diff --git a/modules/komRNG.js b/src/modules/komRNG.ts similarity index 50% rename from modules/komRNG.js rename to src/modules/komRNG.ts index 12371a3..7ec5018 100644 --- a/modules/komRNG.js +++ b/src/modules/komRNG.ts @@ -1,39 +1,40 @@ // Komandy, který jenom pošlou random hovno a jsou nějakým způsobem ovlivněný RNG -const ftipy = JSON.parse(require('fs').readFileSync('addons/ftipy.json')); -const mista = ['na šroťák', 'na vrakoviště', 'na smetiště', 'do kontejneru', 'na skládku', 'do kriminálu', 'pod most', 'do sběru', 'do hospody', 'do najt klubu', 'na folmavu']; +import { readFileSync } from "fs"; +const ftipy: string[] = JSON.parse(readFileSync(`${__dirname}/../../addons/ftipy.json`).toString()); +const mista = ["na šroťák", "na vrakoviště", "na smetiště", "do kontejneru", "na skládku", "do kriminálu", "pod most", "do sběru", "do hospody", "do najt klubu", "na folmavu"]; const uz = ["ne", "jeste ne", "jiz brzy", "za chvili", "vubec", "nikdy", "za dlouho", "za 5 let", "zejtra", "davno", "jo", "mozna"]; -const rand = max => Math.floor(Math.random() * max); +const rand = (max: number) => Math.floor(Math.random() * max); module.exports = { more_komandy: { vtip: { als: ["ftip"], - run: _ => ftipy[rand(ftipy.length)] + run: () => ftipy[rand(ftipy.length)] }, - kam: _ => mista[rand(mista.length)], + kam: () => mista[rand(mista.length)], je: { cd: 1800, - run: _ => rand(2) ? "jo je" : "ne neni" + run: () => rand(2) ? "jo je" : "ne neni" }, ma: { als: ["má"], - run: _ => rand(2) ? "jo ma" : "ne nema" + run: () => rand(2) ? "jo ma" : "ne nema" }, nazor: { als: ["názor"], - run: arg => rand(2) ? `mam rad ${arg}` : `${arg} je picovina` + run: (arg: string) => rand(2) ? `mam rad ${arg}` : `${arg} je picovina` }, si: { als: ["jsi"], - run: arg => { + run: (arg: string) => { const corict = arg.replace(/\?/g, ""); return rand(2) ? `jo sem ${corict}` : `ne nejsem ${corict}`; } @@ -41,7 +42,7 @@ module.exports = { mas: { als: ["máš"], - run: arg => { + run: (arg: string) => { const corict = arg.replace(/\?/g, ""); return rand(2) ? `jo mam ${corict}` : `ne nemam ${corict}`; } @@ -49,18 +50,18 @@ module.exports = { jakmoc: { cd: 1800, - run: arg => `${arg} na ${rand(101)}%` + run: (arg: string) => `${arg} na ${rand(101)}%` }, jakmoc0: { cd: 1800, - run: arg => `${arg} na ${rand(1001)}%` + run: (arg: string) => `${arg} na ${rand(1001)}%` }, uz: { als: ["už", "uz?", "už?"], - run: _ => uz[rand(uz.length)] + run: () => uz[rand(uz.length)] } } }; diff --git a/modules/komStatic.js b/src/modules/komStatic.ts similarity index 74% rename from modules/komStatic.js rename to src/modules/komStatic.ts index 24b8f5e..4d10c12 100644 --- a/modules/komStatic.js +++ b/src/modules/komStatic.ts @@ -1,13 +1,13 @@ // Sekce pro komandy, který jenom pošlou nějaký hovno bez a nevyžadují argumenty -const pomoc = JSON.parse(require('fs').readFileSync('addons/pomoc.json')); +const pomoc: [string[], {}] = require("../../addons/pomoc.json"); module.exports = { more_komandy: { - vole: _ => "coe voe more gadzo", + vole: () => "coe voe more gadzo", - kobel: _ => "kde?", + kobel: () => "kde?", ano: { als: ["jo", "ne"], @@ -29,8 +29,8 @@ module.exports = { pomoc: pomoc[0].join("\n"), - pomoc2: _ => { return { embed: pomoc[1] }; }, + pomoc2: () => { return { embeds: [pomoc[1]] }; }, - verze: _ => `${require("../package.json").version}\nčenžlog mas tady https://denim3001.deadfish.cz/morehovna` + verze: () => `${require("../../package.json").version}\nčenžlog mas tady https://denim3001.deadfish.cz/morehovna` } }; diff --git a/src/modules/onReady.ts b/src/modules/onReady.ts new file mode 100644 index 0000000..d30b00d --- /dev/null +++ b/src/modules/onReady.ts @@ -0,0 +1,5 @@ +// Prostě onready + +module.exports = { + on_ready: () => console.log("A jedeš!") +}; diff --git a/modules/spink.js b/src/modules/spink.ts similarity index 53% rename from modules/spink.js rename to src/modules/spink.ts index c88907b..96bbf8b 100644 --- a/modules/spink.js +++ b/src/modules/spink.ts @@ -1,19 +1,23 @@ // Modul dedikovaný funkci spinkáček -const fetch = require('node-fetch'); -const { formatCas } = require("../addons/utils.js"); -const spinkacky = []; +import { Message, VoiceState } from "discord.js"; +import fetch from "node-fetch"; +import { emouty } from "../utils/emotes"; +import { Spinkackar } from "../utils/types"; +import { formatCas } from "../utils/utils"; -const contactSpinkServer = async (akce, id, nick, avatar) => { - const options = `heslo=${process.env.SPINK_PASS}&akce=${akce}&id=${id}&nick=${encodeURIComponent(nick)}&avatar=${encodeURIComponent(avatar)}`; +const spinkacky: string[] = []; + +const contactSpinkServer = async (akce: string, id: string, nick: string = "", avatar: string | null = "") => { + const options = `heslo=${process.env.SPINK_PASS}&akce=${akce}&id=${id}&nick=${encodeURIComponent(nick)}&avatar=${encodeURIComponent(avatar ?? "")}`; return await fetch(`https://spinkacek.ga/extapi.php?${options}`) .then(r => r.text()) .then(text => text); }; const syncSpink = async () => { - await fetch('https://spinkacek.ga/api/spinkacky') - .then(r => r.json()) + await fetch("https://spinkacek.ga/api/spinkacky") + .then(r => r.json() as Promise>) .then(d => { const data = d.spinkacky; const keys = Object.keys(data); @@ -21,7 +25,7 @@ const syncSpink = async () => { spinkacky.splice(0); for (let i = 0; i < keys.length; i++) { - if (!values[i].spinkacek || keys[i][0] === 'i') continue; + if (!values[i].spinkacek || keys[i][0] === "i") continue; spinkacky.push(keys[i].slice(8)); } }); @@ -34,11 +38,11 @@ module.exports = { spinkacek: { als: ["spinkáček"], - run: (_, mes) => { - if (mes.author.bot) return "až někdy<:kapp:677916836418813953>"; + run: (_: any, mes: Message) => { + if (mes.author.bot) return `až někdy${emouty.kapp}`; (async () => { if (await contactSpinkServer('spinkacek', mes.author.id, mes.author.username, mes.author.avatarURL()) === "OK") - mes.react("761652251966046208"); + mes.react(emouty.spinkacek); else mes.channel.send('nespis uz?????'); })(); } @@ -46,21 +50,19 @@ module.exports = { vstavacek: { als: ["vstáváček"], - run: (_, mes) => { - if (mes.author.bot) return "<:sjeta:623216247953424426>"; + run: (_: any, mes: Message) => { + if (mes.author.bot) return emouty.sjeta; (async () => { const odpoved = await contactSpinkServer('vstavacek', mes.author.id); - const [ok, cas] = odpoved.split(" "); - if (ok !== "OK") { - mes.channel.send("uz jsi vzhuru ty hajzle"); - return; - } + const [ok, casTxt] = odpoved.split(" "); + const cas = Number(casTxt); + if (ok !== "OK") return mes.channel.send("uz jsi vzhuru ty hajzle"); const formatedCas = formatCas(cas); let zpr = ""; - if (cas < 3600) zpr = "dobrej fake spink debile"; - else if (cas > 35999 && cas < 43200) zpr = "fakt bídák"; - else if (cas > 43199 && cas < 57600) zpr = "extrémní bídák"; - else if (cas > 57599) zpr = "mas dat more vstavacek uz kdyz vstanes retarde"; + if (cas >= 57600) zpr = "mas dat more vstavacek uz kdyz vstanes retarde"; + else if (cas >= 43200) zpr = "extrémní bídák"; + else if (cas >= 36000) zpr = "fakt bídák"; + else if (cas < 10800) zpr = "dobrej fake spink debile"; mes.channel.send(`dobry rano hajzle\nspal sy ${formatedCas}\n${zpr}`); })(); @@ -68,13 +70,13 @@ module.exports = { } }, - on_voiceStateUpdate: (bef, aft) => { + on_voiceStateUpdate: (bef: VoiceState, aft: VoiceState) => { if (!aft.channel || bef.channel) return; - if (spinkacky.includes(aft.id)) aft.kick() - .catch(() => { }); + if (spinkacky.includes(aft.id)) aft.disconnect("spinkacek") + .catch(err => console.log("spinkacek odpojit se nepovedlo nebo co:", err)); }, - on_message: mes => { + on_message: (mes: Message) => { if (mes.author.id === '831318260493844494') { syncSpink(); if (mes.content[0] !== 's') return; @@ -82,10 +84,10 @@ module.exports = { if (!uzivatel) return; for (const [_, guild] of mes.client.guilds.cache) { for (const [_, channel] of guild.channels.cache) { - if (channel.type !== "voice") continue; + if (channel.type !== "GUILD_VOICE") continue; for (const [_, member] of channel.members) { if (member.id !== uzivatel) continue; - member.voice.kick("spinkacek"); + member.voice.disconnect("spinkacek"); return; } } diff --git a/src/modules/status.ts b/src/modules/status.ts new file mode 100644 index 0000000..c49e144 --- /dev/null +++ b/src/modules/status.ts @@ -0,0 +1,110 @@ +// Trekování statusů všech lidí o kterých bot ví +import { Client, Guild, Presence, User } from "discord.js"; +import fetch from "node-fetch"; +import { FakePresence, StatusyINaFounu, UserChange, ZmenovejObjekt } from "../utils/types"; + +const role = { online: "Online", idle: "Idle", dnd: "DND", offline: "Offline" }; +const statusy = { Offline: "0", Online: "1", Idle: "2", DND: "3", OnlinePhone: "11", IdlePhone: "12", DNDPhone: "13" }; +const prepSend = (zmeny: UserChange[]) => { + const changes: ZmenovejObjekt[] = []; + + zmeny.forEach(zmena => { + const us = zmena.user; + const objekt: ZmenovejObjekt = { id: us.id }; + if (zmena.ch === "user" || !zmena.ch) { + objekt.nick = us.username; + objekt.pfp = us.avatar ?? ""; + } + if (zmena.ch === "stat" || !zmena.ch) { + objekt.status = zmena.stat; + } + changes.push(objekt); + }); + + poslatData({ changes }); +}; + +const poslatData = (data: Record) => { + data.pwd = process.env.STAT_PASS; + fetch("http://deadfish.cz:4629/endpoint-pro-denimka/", { method: "POST", headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }); +}; + +const statusOnFoun = (bef: FakePresence | null, aft: FakePresence) => { + if (!bef) bef = { status: 'offline', clientStatus: {} }; + const predAPo: StatusyINaFounu[] = []; + + [bef, aft].forEach((s, i) => { + const mobile = s.clientStatus?.mobile; + if (mobile && mobile !== s.clientStatus?.desktop) { + predAPo[i] = `${role[mobile]}Phone` as StatusyINaFounu; + } else { + predAPo[i] = role[s.status] as StatusyINaFounu; + } + }); + + return predAPo; +}; + +const ziju = () => { + poslatData({ nejsemPoslej: !0 }); + setTimeout(ziju, 60_000); +}; + +if (!process.env.IGNORE_PRESENCE) ziju(); + +const getRole = (status: StatusyINaFounu, server: Guild) => + server.roles.cache.find(role => role.name === `Status${status}`); + +module.exports = { + + // Změna rolí podle statusu a odeslání statusu + on_presenceUpdate: (bef: Presence, aft: Presence) => { + if (process.env.IGNORE_PRESENCE) return; + + const [statusPred, statusPo] = statusOnFoun(bef as FakePresence, aft as FakePresence); + if (statusPred === statusPo) return; + const rolePred = getRole(statusPred, aft.guild!); + const rolePo = getRole(statusPo, aft.guild!); + + + if (rolePred) aft.member!.roles.remove(rolePred); + if (rolePo) aft.member!.roles.add(rolePo); + + prepSend([{ ch: "stat", user: aft.user!, stat: statusy[statusPo] }]); + }, + + // Odeslání statusů při startu bota + on_ready: () => { + if (process.env.IGNORE_PRESENCE) return; + + const client: Client = module.exports.client; + const guildy = client.guilds.cache; + const userove = client.users.cache.clone(); + const presence: Presence[] = []; + const changes: UserChange[] = []; + + guildy.each(guilda => { + guilda.presences.cache.each(pres => { + if (!presence.filter(prs => prs.userId === pres.userId).length) presence.push(pres); + }); + }); + + presence.forEach(presenc => { + const status = statusOnFoun(null, presenc as FakePresence)[1]; + changes.push({ user: userove.get(presenc.userId)!, stat: statusy[status] }); + userove.delete(presenc.userId); + }); + + userove.each(member => { + changes.push({ user: member, stat: "0" }); + }); + + prepSend(changes); + }, + + // Odeslání statusu při změně jména nebo profilovky + on_userUpdate: (_: any, aft: User) => { + if (!process.env.IGNORE_PRESENCE && aft.id !== aft.client.user?.id) + prepSend([{ ch: "user", user: aft }]); + } +}; diff --git a/src/modules/vojs.ts b/src/modules/vojs.ts new file mode 100644 index 0000000..d41393a --- /dev/null +++ b/src/modules/vojs.ts @@ -0,0 +1,123 @@ +// Cokoliv co má něco společnýho s vojsem + +import { getVoiceConnection, VoiceConnection, VoiceConnectionStatus } from "@discordjs/voice"; +import { GuildMember, Message, VoiceChannel, VoiceState } from "discord.js"; +import { emouty } from "../utils/emotes"; +import { joinVoice, leave, play } from "../utils/utils"; + +const timeouty: Record = {}; + +const vypocitatCas = (conn: VoiceConnection) => { + const c = new Date(); + const d = new Date(); + let hod = d.getHours(); + let min = d.getMinutes(); + if (min >= 30) { + min = 0; + if (hod == 23) { + hod = 0; + d.setDate(c.getDate() + 1); + } else { + hod++; + } + } else { + min = 30; + } + d.setHours(hod); + d.setMinutes(min); + d.setSeconds(0); + + timeouty[conn.joinConfig.guildId] = setTimeout(() => rekniCas(conn, `${nula(hod)}${nula(min)}`), Number(d) - Number(c)); +}; + +const nula = (a: Number) => a < 10 ? `0${a}` : a; + +const rekniCas = (conn: VoiceConnection, cas: string) => { + play(conn, [{ name: "../zvuky/intro.mp3", volume: 0.8 }, { name: `../zvuky/${cas}.mp3`, volume: 2 }, { name: "../zvuky/grg.mp3", volume: 0.5 }]) + .then(() => { + vypocitatCas(conn); + }) + .catch(err => { console.log("cas error:", err); }); +}; + +const vytahnout = (member: GuildMember, patro: number) => { + const vojs = member.voice.channel; + if (!vojs) return; + + const aktPatro = Number(vojs.name) || 0; + let dalsiPatro: number | string = aktPatro; + if (patro < aktPatro) dalsiPatro--; else if (patro > aktPatro) dalsiPatro++; else return; + if (dalsiPatro === 0) dalsiPatro = "P"; + + const dalsiVojs = member.guild.channels.cache.filter(channel => channel.type === "GUILD_VOICE" && channel.name === String(dalsiPatro)).first() as VoiceChannel | undefined; + if (!dalsiVojs) return; + + member.voice.setChannel(dalsiVojs); + setTimeout(() => vytahnout(member, patro), 1e3); +}; + +module.exports = { + more_komandy: { + + wojs: (_: any, mes: Message) => `vojs se pise s normalnim v ti kriple ${mes.author}`, + + vojs: { + // cd: 1800, + run: (arg: string, mes: Message) => { + const channel = mes.member?.voice.channel; + if (!channel) return `di si tam sam ne ty gadzo ${mes.author}`; + + // if (arg !== "potichu") mes.channel.send("<@&591306633196339261> vojs"); + + joinVoice(channel) + .then(obj => { + const conn = obj.conn; + if (!timeouty[mes.guildId!]) { + vypocitatCas(conn); + conn.on(VoiceConnectionStatus.Disconnected, () => conn.destroy()); + conn.on(VoiceConnectionStatus.Destroyed, () => { + clearTimeout(timeouty[mes.guildId!]); + delete timeouty[mes.guildId!]; + }); + } + play(conn, "../zvuky/nazdar.ogg"); + }); + } + }, + + vypadni: { + als: ["odejdi", "disconnect", "leave", "odpoj", "votpoj", "vodpoj", "vodprejskni", "tahni", "táhni"], + run: (_: any, mes: Message) => { + const vojs = getVoiceConnection(mes.guildId!); + if (!vojs) return 'nejsem ve vojsu'; + + vojs.destroy(); + mes.react(emouty.purfieRIP); + } + }, + + vytah: { + als: ["vitah", "výtah"], + run: (arg: string, mes: Message) => { + if (!mes.member?.voice.channel) return `nejsi ve vojsu ty gadzo ${mes.author}`; + if (!arg) return `napis do jakiho patra ${mes.author}`; + + vytahnout(mes.member, Number(arg) || 0); + } + }, + + krkacek: { + als: ["krkáček", "krkácek", "krkaček", "krk", "grg", "grgnisi", "krknisi", "grgacek", "grgáček", "grgácek", "grgaček"], + run: async (_: any, mes: Message) => { + const channel = mes.member?.voice.channel; + if (!channel) return mes.channel.send("***grrrrrrrrg***"); + + const { conn, prev } = await joinVoice(channel); + await play(conn, "../zvuky/grg.mp3"); + if (prev === true) return; // Byl jsem v tomdle vojsu + if (prev === false) return leave(mes.guildId!); // Nebyl jsem ve vojsu vůbec + joinVoice(prev as string, mes.guild!); // Byl jsem jinde + } + } + } +}; diff --git a/modules/zbytek.js b/src/modules/zbytek.ts similarity index 50% rename from modules/zbytek.js rename to src/modules/zbytek.ts index dc3fc3e..a6b0af5 100644 --- a/modules/zbytek.js +++ b/src/modules/zbytek.ts @@ -1,17 +1,20 @@ // Komandy nebo handelery který se nikam jinam nehodí +import { getVoiceConnections } from "@discordjs/voice"; +import { Message } from "discord.js"; + module.exports = { more_komandy: { - debug_log: arg => { - console.log('log: ', arg); - return 'je to v konzoli'; + debug_log: (arg: string) => { + console.log("log: ", arg); + return "je to v konzoli"; }, - update: (_, mes) => { + update: (_: any, mes: Message) => { if (mes.channel.id != process.env.ADMIN_CHANNEL && mes.author.id != process.env.ADMIN_ID) return "nato nemas prava kokote"; - [...mes.client.voice?.connections.values()].forEach(con => con.disconnect()); + getVoiceConnections().forEach(con => con.disconnect()); mes.react("👋") .then(() => process.exit()); } diff --git a/src/utils/emotes.ts b/src/utils/emotes.ts new file mode 100644 index 0000000..c0b04b9 --- /dev/null +++ b/src/utils/emotes.ts @@ -0,0 +1,11 @@ +export enum emouty { + purfieRIP = "<:purfieRIP:855120055632134155>", + clap = "", + clap2 = "", + lickL = "", + lickR = "", + d3k = "<:D3K:730175107313565717>", + kapp = "<:kapp:677916836418813953>", + spinkacek = "<:spinkacek:761652251966046208>", + sjeta = "<:sjeta:623216247953424426>" +} diff --git a/src/utils/types.ts b/src/utils/types.ts new file mode 100644 index 0000000..b22b6e3 --- /dev/null +++ b/src/utils/types.ts @@ -0,0 +1,50 @@ +import { Client, ClientPresenceStatusData, Message, User } from "discord.js"; + +type RunFunkce = (argumenty: string, message: Message) => undefined | string | Promise; + +interface KomandRaw { + als?: string[]; + cd?: number; + run: RunFunkce; +}; + +export type ListenerFunkce = (...args: any[]) => void; + +export type Modul = { + more_komandy: Record; + client: Client; +} & Record; + +export interface Komand { + run: RunFunkce | string; + cd?: number; +} + +export interface Spinkackar { + spinkacek: boolean; +} + +export interface FakePresence { + status: "online" | "idle" | "dnd" | "offline"; + clientStatus: ClientPresenceStatusData; +} + +export interface UserChange { + user: User; + ch?: "user" | "stat"; + stat?: string; +} + +export type StatusyINaFounu = "Online" | "OnlinePhone" | "Idle" | "IdlePhone" | "DND" | "DNDPhone" | "Offline"; + +export interface ZmenovejObjekt { + id: string, + nick?: string, + pfp?: string, + status?: string; +} + +export interface MuzikaFace { + name: string, + volume?: number; +} diff --git a/src/utils/utils.ts b/src/utils/utils.ts new file mode 100644 index 0000000..2b61341 --- /dev/null +++ b/src/utils/utils.ts @@ -0,0 +1,99 @@ +import { AudioPlayerStatus, AudioResource, createAudioPlayer, createAudioResource, entersState, getVoiceConnection, joinVoiceChannel, PlayerSubscription, VoiceConnection, VoiceConnectionStatus } from "@discordjs/voice"; +import { Guild, StageChannel, VoiceChannel } from "discord.js"; +import { once } from "events"; +import { MuzikaFace } from "./types"; + +const pripojeni: Record = {}; + +export const formatCas = (cas: number) => { + const h = Math.floor(cas / 3600); + const m = Math.floor(cas % 3600 / 60); + const s = Math.floor(cas % 3600 % 60); + + return `${h} hodin ${m} mynut a ${s} se kund`; +}; + +export const joinVoice = async (channel: VoiceChannel | StageChannel | string, guild?: Guild) => { + const channelId = typeof channel === "string" ? channel : channel.id; + const guildId = typeof channel === "string" ? guild!.id : channel.guildId; + const guilda = typeof channel === "string" ? guild! : channel.guild; + + let conn = getVoiceConnection(guildId); + let prev: Boolean | string = false; + if (conn) { + if (conn.joinConfig.channelId === channelId) return { conn, prev: true }; + prev = conn.joinConfig.channelId!; + } + + conn = joinVoiceChannel({ + channelId, + guildId, + adapterCreator: guilda.voiceAdapterCreator + }); + + await entersState(conn, VoiceConnectionStatus.Ready, 3e4) + .catch((err: Error) => { + conn!.destroy(); + throw err; + }); + + if (!prev) { + const player = createAudioPlayer(); + pripojeni[guildId] = conn.subscribe(player)!; + } + + return { conn, prev }; +}; + +const makeAudioPlayer = (co: string | MuzikaFace) => { + if (typeof co === "string") return createAudioResource(co); + const res = createAudioResource(co.name, { inlineVolume: !!co.volume }); + if (co.volume) res.volume?.setVolume(co.volume); + return res; +}; + +export const play = (conn: VoiceConnection, co: string | MuzikaFace | MuzikaFace[]) => { + return new Promise(async (res, rej) => { + if (conn.state.status !== VoiceConnectionStatus.Ready) return rej("conn není ready"); + + const player = pripojeni[conn.joinConfig.guildId].player; + if (!Array.isArray(co)) { + let aud = makeAudioPlayer(co); + player.play(aud); + const funkce = () => { + res(); + player.removeListener(AudioPlayerStatus.Idle, funkce); + }; + player.on(AudioPlayerStatus.Idle, funkce); + return; + } + + const resources: AudioResource[] = []; + co.forEach(c => { + const res = makeAudioPlayer(c); + resources.push(res); + }); + for (const res of resources) { + await once(res.playStream, "readable"); + } + player.play(resources[0]); + + let i = 1; + const funkce = () => { + player.play(resources[i]); + i++; + if (i === resources.length) { + res(); + player.removeListener(AudioPlayerStatus.Idle, funkce); + } + }; + player.on(AudioPlayerStatus.Idle, funkce); + }); +}; + +export const leave = (guildId: string) => { + const conn = getVoiceConnection(guildId); + if (!conn) return; + conn.destroy(); + delete pripojeni[guildId]; +}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..2016e2a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2021", + "module": "CommonJS", + "rootDir": "./src", + "outDir": "./out", + "moduleResolution": "Node", + "strict": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true, + "removeComments": true, + }, + "include": [ + "src" + ] +}