2302.1 ES & Fixes

This commit is contained in:
Vladimir (unknowableshade) Eremin committed 2023-02-19 20:29:37 +03:00
1 parent 6a3245f8de
commit cb52ee1b59
36 files changed
+229 -225

No files matched your search

+3 -4
View File
@@ -6,16 +6,15 @@ name: CI/CD
on:
push:
tags:
- '*'
- "*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
@@ -24,7 +23,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: "npm"
- run: npm ci
- run: npm run build --if-present
+6 -6
View File
@@ -1,9 +1,10 @@
FROM node:16
RUN apt -y update
RUN apt install -y ffmpeg
RUN apt install -y python3-pip
FROM node:18-alpine
RUN apk update
RUN apk add --no-cache bash
RUN apk add --no-cache curl
RUN apk add --no-cache ffmpeg
RUN apk add --no-cache python3
WORKDIR /usr/src/app
@@ -11,7 +12,6 @@ RUN mkdir bin
RUN curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/src/app/bin/youtube-dl
RUN chmod a+rx /usr/src/app/bin/youtube-dl
COPY package*.json ./
RUN npm ci
+1 -1
View File
@@ -1,4 +1,4 @@
# Quetza - 2210.1 <soundrewrite>
# Quetza - 2302.1 <soundrewrite>
_Neat typescript discord bot._
+100 -101
View File
@@ -7,6 +7,7 @@
"": {
"name": "quetza-bot",
"version": "2205.3.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@discordjs/opus": "^0.8.0",
@@ -24,7 +25,7 @@
"typescript": "^4.8.2"
},
"engines": {
"node": "16.x.x",
"node": "18.x.x",
"npm": "*"
}
},
@@ -45,9 +46,9 @@
}
},
"node_modules/@discordjs/builders/node_modules/discord-api-types": {
"version": "0.37.27",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.27.tgz",
"integrity": "sha512-rfB4zT9gkKgIfLOgXQZPUXaaKY9gwQhyhiir5TU/GN+38E39NNasRPYOcAeM4JPGAuDrHDvPtYiZGa0GfT60ww=="
"version": "0.37.35",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.35.tgz",
"integrity": "sha512-iyKZ/82k7FX3lcmHiAvvWu5TmyfVo78RtghBV/YsehK6CID83k5SI03DKKopBcln+TiEIYw5MGgq7SJXSpNzMg=="
},
"node_modules/@discordjs/collection": {
"version": "1.3.0",
@@ -108,9 +109,9 @@
}
},
"node_modules/@discordjs/rest/node_modules/discord-api-types": {
"version": "0.37.27",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.27.tgz",
"integrity": "sha512-rfB4zT9gkKgIfLOgXQZPUXaaKY9gwQhyhiir5TU/GN+38E39NNasRPYOcAeM4JPGAuDrHDvPtYiZGa0GfT60ww=="
"version": "0.37.35",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.35.tgz",
"integrity": "sha512-iyKZ/82k7FX3lcmHiAvvWu5TmyfVo78RtghBV/YsehK6CID83k5SI03DKKopBcln+TiEIYw5MGgq7SJXSpNzMg=="
},
"node_modules/@discordjs/util": {
"version": "0.1.0",
@@ -269,9 +270,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "18.11.18",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz",
"integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA=="
"version": "18.14.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.0.tgz",
"integrity": "sha512-5EWrvLmglK+imbCJY0+INViFWUHg1AHel1sq4ZVSfdcNqGy9Edv3UB9IIzzg+xPaUcAgZYcfVs2fBcwDeZzU0A=="
},
"node_modules/@types/semver": {
"version": "7.3.13",
@@ -288,15 +289,16 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz",
"integrity": "sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.52.0.tgz",
"integrity": "sha512-lHazYdvYVsBokwCdKOppvYJKaJ4S41CgKBcPvyd0xjZNbvQdhn/pnJlGtQksQ/NhInzdaeaSarlBjDXHuclEbg==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.48.0",
"@typescript-eslint/type-utils": "5.48.0",
"@typescript-eslint/utils": "5.48.0",
"@typescript-eslint/scope-manager": "5.52.0",
"@typescript-eslint/type-utils": "5.52.0",
"@typescript-eslint/utils": "5.52.0",
"debug": "^4.3.4",
"grapheme-splitter": "^1.0.4",
"ignore": "^5.2.0",
"natural-compare-lite": "^1.4.0",
"regexpp": "^3.2.0",
@@ -321,14 +323,14 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.0.tgz",
"integrity": "sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.52.0.tgz",
"integrity": "sha512-e2KiLQOZRo4Y0D/b+3y08i3jsekoSkOYStROYmPUnGMEoA0h+k2qOH5H6tcjIc68WDvGwH+PaOrP1XRzLJ6QlA==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.48.0",
"@typescript-eslint/types": "5.48.0",
"@typescript-eslint/typescript-estree": "5.48.0",
"@typescript-eslint/scope-manager": "5.52.0",
"@typescript-eslint/types": "5.52.0",
"@typescript-eslint/typescript-estree": "5.52.0",
"debug": "^4.3.4"
},
"engines": {
@@ -348,13 +350,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz",
"integrity": "sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.52.0.tgz",
"integrity": "sha512-AR7sxxfBKiNV0FWBSARxM8DmNxrwgnYMPwmpkC1Pl1n+eT8/I2NAUPuwDy/FmDcC6F8pBfmOcaxcxRHspgOBMw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.48.0",
"@typescript-eslint/visitor-keys": "5.48.0"
"@typescript-eslint/types": "5.52.0",
"@typescript-eslint/visitor-keys": "5.52.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -365,13 +367,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz",
"integrity": "sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.52.0.tgz",
"integrity": "sha512-tEKuUHfDOv852QGlpPtB3lHOoig5pyFQN/cUiZtpw99D93nEBjexRLre5sQZlkMoHry/lZr8qDAt2oAHLKA6Jw==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "5.48.0",
"@typescript-eslint/utils": "5.48.0",
"@typescript-eslint/typescript-estree": "5.52.0",
"@typescript-eslint/utils": "5.52.0",
"debug": "^4.3.4",
"tsutils": "^3.21.0"
},
@@ -392,9 +394,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.0.tgz",
"integrity": "sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.52.0.tgz",
"integrity": "sha512-oV7XU4CHYfBhk78fS7tkum+/Dpgsfi91IIDy7fjCyq2k6KB63M6gMC0YIvy+iABzmXThCRI6xpCEyVObBdWSDQ==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -405,13 +407,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz",
"integrity": "sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.52.0.tgz",
"integrity": "sha512-WeWnjanyEwt6+fVrSR0MYgEpUAuROxuAH516WPjUblIrClzYJj0kBbjdnbQXLpgAN8qbEuGywiQsXUVDiAoEuQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.48.0",
"@typescript-eslint/visitor-keys": "5.48.0",
"@typescript-eslint/types": "5.52.0",
"@typescript-eslint/visitor-keys": "5.52.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@@ -432,16 +434,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.0.tgz",
"integrity": "sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.52.0.tgz",
"integrity": "sha512-As3lChhrbwWQLNk2HC8Ree96hldKIqk98EYvypd3It8Q1f8d5zWyIoaZEp2va5667M4ZyE7X8UUR+azXrFl+NA==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.48.0",
"@typescript-eslint/types": "5.48.0",
"@typescript-eslint/typescript-estree": "5.48.0",
"@typescript-eslint/scope-manager": "5.52.0",
"@typescript-eslint/types": "5.52.0",
"@typescript-eslint/typescript-estree": "5.52.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0",
"semver": "^7.3.7"
@@ -458,12 +460,12 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "5.48.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz",
"integrity": "sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q==",
"version": "5.52.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.52.0.tgz",
"integrity": "sha512-qMwpw6SU5VHCPr99y274xhbm+PRViK/NATY6qzt+Et7+mThGuFSl/ompj2/hrBlRP/kq+BFdgagnOSgw9TB0eA==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.48.0",
"@typescript-eslint/types": "5.52.0",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
@@ -480,9 +482,9 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"node_modules/acorn": {
"version": "8.8.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz",
"integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==",
"version": "8.8.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
"integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
"dev": true,
"bin": {
"acorn": "bin/acorn"
@@ -789,9 +791,9 @@
}
},
"node_modules/discord.js/node_modules/discord-api-types": {
"version": "0.37.27",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.27.tgz",
"integrity": "sha512-rfB4zT9gkKgIfLOgXQZPUXaaKY9gwQhyhiir5TU/GN+38E39NNasRPYOcAeM4JPGAuDrHDvPtYiZGa0GfT60ww=="
"version": "0.37.35",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.35.tgz",
"integrity": "sha512-iyKZ/82k7FX3lcmHiAvvWu5TmyfVo78RtghBV/YsehK6CID83k5SI03DKKopBcln+TiEIYw5MGgq7SJXSpNzMg=="
},
"node_modules/doctrine": {
"version": "3.0.0",
@@ -823,9 +825,9 @@
}
},
"node_modules/eslint": {
"version": "8.31.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.31.0.tgz",
"integrity": "sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA==",
"version": "8.34.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.34.0.tgz",
"integrity": "sha512-1Z8iFsucw+7kSqXNZVslXS8Ioa4u2KM7GPwuKtkTFAqZ/cHMcEaR+1+Br0wLlot49cNxIiZk5wp8EAbPcYZxTg==",
"dev": true,
"dependencies": {
"@eslint/eslintrc": "^1.4.1",
@@ -967,9 +969,9 @@
}
},
"node_modules/esquery": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
"integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
"integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
"dev": true,
"dependencies": {
"estraverse": "^5.1.0"
@@ -1093,9 +1095,9 @@
}
},
"node_modules/file-type": {
"version": "18.0.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-18.0.0.tgz",
"integrity": "sha512-jjMwFpnW8PKofLE/4ohlhqwDk5k0NC6iy0UHAJFKoY1fQeGMN0GDdLgHQrvCbSpMwbqzoCZhRI5dETCZna5qVA==",
"version": "18.2.1",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-18.2.1.tgz",
"integrity": "sha512-Yw5MtnMv7vgD2/6Bjmmuegc8bQEVA9GmAyaR18bMYWKqsWDG9wgYZ1j4I6gNMF5Y5JBDcUcjRQqNQx7Y8uotcg==",
"dependencies": {
"readable-web-to-node-stream": "^3.0.2",
"strtok3": "^7.0.0",
@@ -1233,9 +1235,9 @@
}
},
"node_modules/globals": {
"version": "13.19.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz",
"integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==",
"version": "13.20.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
"integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
"dev": true,
"dependencies": {
"type-fest": "^0.20.2"
@@ -1420,9 +1422,9 @@
"dev": true
},
"node_modules/js-sdsl": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.2.0.tgz",
"integrity": "sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ==",
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
"integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
"dev": true,
"funding": {
"type": "opencollective",
@@ -1584,12 +1586,9 @@
}
},
"node_modules/minipass": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz",
"integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==",
"dependencies": {
"yallist": "^4.0.0"
},
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.3.tgz",
"integrity": "sha512-OW2r4sQ0sI+z5ckEt5c1Tri4xTgZwYDxpE54eqWlQloQRoWtXjqt9udJ5Z4dSv7wK+nfFI7FRXyCpBSft+gpFw==",
"engines": {
"node": ">=8"
}
@@ -1646,14 +1645,14 @@
"dev": true
},
"node_modules/node-addon-api": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz",
"integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA=="
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
"integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
},
"node_modules/node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz",
"integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
@@ -1863,9 +1862,9 @@
}
},
"node_modules/punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
"dev": true,
"engines": {
"node": ">=6"
@@ -2201,14 +2200,14 @@
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/ts-mixer": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.2.tgz",
"integrity": "sha512-zvHx3VM83m2WYCE8XL99uaM7mFwYSkjR2OZti98fabHrwkjsCvgwChda5xctein3xGOyaQhtTeDq/1H/GNvF3A=="
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
"integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ=="
},
"node_modules/tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
},
"node_modules/tsutils": {
"version": "3.21.0",
@@ -2261,9 +2260,9 @@
}
},
"node_modules/typescript": {
"version": "4.9.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz",
"integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==",
"version": "4.9.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -2274,9 +2273,9 @@
}
},
"node_modules/undici": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.14.0.tgz",
"integrity": "sha512-yJlHYw6yXPPsuOH0x2Ib1Km61vu4hLiRRQoafs+WUgX1vO64vgnxiCEN9dpIrhZyHFsai3F0AEj4P9zy19enEQ==",
"version": "5.20.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.20.0.tgz",
"integrity": "sha512-J3j60dYzuo6Eevbawwp1sdg16k5Tf768bxYK4TUJRH7cBM4kFCbf3mOnM/0E3vQYXvpxITbbWmBafaDbxLDz3g==",
"dependencies": {
"busboy": "^1.6.0"
},
@@ -2350,9 +2349,9 @@
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"node_modules/ws": {
"version": "8.12.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.12.0.tgz",
"integrity": "sha512-kU62emKIdKVeEIOIKVegvqpXMSTAMLJozpHZaJNDYqBjzlSYXQGviYwN1osDLJ9av68qHd4a2oSjd7yD4pacig==",
"version": "8.12.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.12.1.tgz",
"integrity": "sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==",
"engines": {
"node": ">=10.0.0"
},
+4 -3
View File
@@ -1,10 +1,11 @@
{
"name": "quetza-bot",
"engines": {
"node": "16.x.x",
"node": "18.x.x",
"npm": "*"
},
"version": "2205.3.0",
"type": "module",
"version": "2302.1.0",
"description": "Discord multifunctional bot",
"author": {
"name": "unknowableshade",
@@ -22,7 +23,7 @@
"license": "MIT",
"main": "dist/index.js",
"scripts": {
"postinstall": "npm run build",
"poststart": "npm run build",
"start": "node dist/index.js",
"build": "tsc --build",
"clean": "tsc --build --clean"
+4 -4
View File
@@ -1,12 +1,12 @@
import Client from "../lib/Client";
import Client from "../lib/Client.js";
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+5 -5
View File
@@ -1,7 +1,7 @@
import Client from "../lib/Client";
import Client from "../lib/Client.js";
import { CommandInteraction, GuildMember, SlashCommandBuilder } from "discord.js";
import I18n from "../lib/I18n";
import { CommandInteraction, GuildMember, SlashCommandBuilder, TextChannel } from "discord.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel || !ctx.member) return;
@@ -9,8 +9,8 @@ export async function run(client: Client, ctx: CommandInteraction) {
await ctx.deferReply();
const player =
client.modules.music.get(ctx.guild.id, ctx.channel) ||
client.modules.music.set(ctx.guild, ctx.channel);
client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel) ||
client.modules.music.set(ctx.guild, ctx.channel as TextChannel);
if (!player.Connection) {
const channel = (ctx.member as GuildMember).voice.channel;
+4 -4
View File
@@ -1,13 +1,13 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const filter = ctx.options.get("filter")?.value as string;
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,14 +1,14 @@
import Client from "../lib/Client";
import Client from "../lib/Client.js";
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel || !ctx.member) return;
await ctx.deferReply();
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
await ctx.editReply({ embeds: [I18n.en.playerInfo(player)] });
}
+4 -4
View File
@@ -1,6 +1,6 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const pos = ctx.options.get("position")?.value as number;
@@ -8,7 +8,7 @@ export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !query || !pos || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,13 +1,13 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const query = ctx.options.get("query")?.value as string;
if (!ctx.guild || !query || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+5 -5
View File
@@ -1,14 +1,14 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import { loopOption } from "../lib/Types";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import { loopOption } from "../lib/Types.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const query = ctx.options.get("option")?.value as string;
if (!ctx.guild || !query || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,11 +1,11 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,11 +1,11 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+2 -2
View File
@@ -1,6 +1,6 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const start = Date.now();
+3 -3
View File
@@ -1,7 +1,7 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import { run as connect } from "./connect";
import I18n from "../lib/I18n";
import Client from "../lib/Client.js";
import { run as connect } from "./connect.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const query = ctx.options.get("query")?.value as string;
+5 -4
View File
@@ -6,16 +6,17 @@ import {
CommandInteraction,
Message,
MessageActionRowComponentBuilder,
SlashCommandBuilder
SlashCommandBuilder,
TextChannel
} from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,13 +1,13 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const query = ctx.options.get("query")?.value as string;
if (!ctx.guild || !query || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,11 +1,11 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,6 +1,6 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const hours = ctx.options.get("hrs")?.value as number || 0;
@@ -9,7 +9,7 @@ export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,11 +1,11 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+4 -4
View File
@@ -1,13 +1,13 @@
import { CommandInteraction, SlashCommandBuilder } from "discord.js";
import Client from "../lib/Client";
import I18n from "../lib/I18n";
import { CommandInteraction, SlashCommandBuilder, TextChannel } from "discord.js";
import Client from "../lib/Client.js";
import I18n from "../lib/I18n.js";
export async function run(client: Client, ctx: CommandInteraction) {
const volume = ctx.options.get("volume")?.value as number || 100;
if (!ctx.guild || !ctx.channel) return;
const player = client.modules.music.get(ctx.guild.id, ctx.channel);
const player = client.modules.music.get(ctx.guild.id, ctx.channel as TextChannel);
if (!player) return;
+3
View File
@@ -1,4 +1,7 @@
import path from "path";
import { fileURLToPath } from "url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const config = {
token: process.env.DISCORD_TOKEN,
+1 -1
View File
@@ -1,5 +1,5 @@
import { Interaction } from "discord.js";
import Client from "../lib/Client";
import Client from "../lib/Client.js";
export async function run(client: Client, args: Interaction[]): Promise<void> {
const [interaction] = args;
+1 -1
View File
@@ -1,4 +1,4 @@
import Client from "../lib/Client";
import Client from "../lib/Client.js";
import { generateDependencyReport } from "@discordjs/voice";
import { ActivityType } from "discord.js";
+3 -3
View File
@@ -1,7 +1,7 @@
import { VoiceState } from "discord.js";
import I18n from "../lib/I18n";
import Client from "../lib/Client";
import { asleep } from "../lib/Misc";
import I18n from "../lib/I18n.js";
import Client from "../lib/Client.js";
import { asleep } from "../lib/Misc.js";
export async function run(client: Client, args: VoiceState[]): Promise<void> {
const [oldState] = args;
+2 -2
View File
@@ -1,5 +1,5 @@
import Client from "./lib/Client";
import config from "./config";
import Client from "./lib/Client.js";
import config from "./config.js";
const client = new Client();
+10 -9
View File
@@ -1,11 +1,13 @@
import {
Client as DiscordClient
Client as DiscordClient,
GatewayIntentBits
} from "discord.js";
import { existsSync, readdirSync } from "fs";
import path from "path";
import Music from "./Music";
import { command, event } from "./Types";
import config from "../config";
import Music from "./Music.js";
import { command, event } from "./Types.js";
import config from "../config.js";
import { pathToFileURL } from "url";
export default class Client extends DiscordClient {
private commands = new Map<string, command>();
@@ -21,9 +23,8 @@ export default class Client extends DiscordClient {
public constructor() {
super({
intents: [
"Guilds",
"GuildMessages",
"GuildVoiceStates",
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates
],
});
@@ -33,7 +34,7 @@ export default class Client extends DiscordClient {
);
for (const file of files) {
import(path.join(config.commands, file)).then((cmd: command) =>
import(pathToFileURL(path.join(config.commands, file)).toString()).then((cmd: command) =>
this.commands.set(cmd.data.name, cmd)
);
}
@@ -45,7 +46,7 @@ export default class Client extends DiscordClient {
);
for (const file of files) {
import(path.join(config.events, file)).then((evnt: event) => {
import(pathToFileURL(path.join(config.events, file)).toString()).then((evnt: event) => {
this.on(evnt.name, (...args: unknown[]) =>
evnt.run(this, args)
);
+2 -2
View File
@@ -1,7 +1,7 @@
import { ytdlArgs, ytdlResponse } from "./Types";
import { ytdlArgs, ytdlResponse } from "./Types.js";
import { execFile } from "child_process";
import { promisify } from "util";
import config from "../config";
import config from "../config.js";
import path from "path";
const execFileAsync = promisify(execFile);
+4 -4
View File
@@ -1,7 +1,7 @@
import Player from "./Player";
import { loopOption, track } from "./Types";
import { loopMoji, secToISO, statusBarGenerator, volumeMoji } from "./Misc";
import Queue from "./Queue";
import Player from "./Player.js";
import { loopOption, track } from "./Types.js";
import { loopMoji, secToISO, statusBarGenerator, volumeMoji } from "./Misc.js";
import Queue from "./Queue.js";
import { AudioResource } from "@discordjs/voice";
import { EmbedBuilder } from "discord.js";
+1 -1
View File
@@ -1,4 +1,4 @@
import { loopOption } from "./Types";
import { loopOption } from "./Types.js";
export function statusBarGenerator(duration: number, length: number): string {
duration = Math.max(0, duration);
+4 -4
View File
@@ -1,10 +1,10 @@
import { Guild, TextBasedChannel } from "discord.js";
import Player from "./Player";
import { Guild, TextChannel } from "discord.js";
import Player from "./Player.js";
export default class Music {
private players = new Map<string, Player>();
public get(guildId: string, channel?: TextBasedChannel): Player | undefined {
public get(guildId: string, channel?: TextChannel): Player | undefined {
const player = this.players.get(guildId);
if (player) {
if (channel) player.Channel = channel;
@@ -12,7 +12,7 @@ export default class Music {
}
}
public set(guild: Guild, channel: TextBasedChannel): Player {
public set(guild: Guild, channel: TextChannel): Player {
const player = new Player(guild, this, channel);
this.players.set(guild.id, player);
+13 -13
View File
@@ -14,30 +14,30 @@ import {
import {
Guild,
Message,
TextBasedChannel,
TextChannel,
User,
VoiceBasedChannel,
} from "discord.js";
import Music from "./Music";
import Filter from "./Filter";
import Queue from "./Queue";
import { fetchStream } from "./Fetch";
import I18n from "./I18n";
import Music from "./Music.js";
import Filter from "./Filter.js";
import Queue from "./Queue.js";
import { fetchStream } from "./Fetch.js";
import I18n from "./I18n.js";
import ytdl from "discord-ytdl-core";
import { track } from "./Types";
import { largestCommonSequence } from "./Misc";
import { track } from "./Types.js";
import { largestCommonSequence } from "./Misc.js";
export default class Player {
private music: Music;
private guild: Guild;
private channel: TextBasedChannel;
public get Channel(): TextBasedChannel {
private channel: TextChannel;
public get Channel(): TextChannel {
return this.channel;
}
public set Channel(x: TextBasedChannel) {
public set Channel(x: TextChannel) {
this.channel = x;
}
@@ -84,11 +84,11 @@ export default class Player {
public constructor(
guild: Guild,
music: Music,
textBasedChannel: TextBasedChannel
textChannel: TextChannel
) {
this.music = music;
this.guild = guild;
this.channel = textBasedChannel;
this.channel = textChannel;
this.player = createAudioPlayer();
+1 -1
View File
@@ -1,4 +1,4 @@
import { loopOption, track } from "./Types";
import { loopOption, track } from "./Types.js";
export default class Queue {
private tracks: track[] = [];
+1 -1
View File
@@ -1,5 +1,5 @@
import { ApplicationCommandData, User, CommandInteraction } from "discord.js";
import Client from "./Client";
import Client from "./Client.js";
export type track = {
url: string;
+1 -1
View File
@@ -2,7 +2,7 @@
"compilerOptions": {
"strict": true,
"module": "CommonJS",
"module": "ESNext",
"moduleResolution": "node",
"outDir": "dist",
"removeComments": false,