From 5fe56b2a409590b634b13ecaf71e5475d0d38321 Mon Sep 17 00:00:00 2001 From: AlexInCube Date: Mon, 18 Sep 2023 18:58:06 +0300 Subject: [PATCH] 2.4.1 Updated README.md, added a step with Discord Developer Portal. Fixed some localization errors. Update ytdl-core to 4.13.0. --- README.md | 2 +- package.json | 16 +- pnpm-lock.yaml | 208 ++++++++++++------------- src/locales/en/commandshandlers.json | 4 +- src/locales/en/general.json | 3 +- src/locales/ru/commandshandlers.json | 4 +- src/locales/ru/general.json | 3 +- src/utilities/pagination/pagination.ts | 5 +- src/utilities/sum.ts | 3 - 9 files changed, 125 insertions(+), 123 deletions(-) delete mode 100644 src/utilities/sum.ts diff --git a/README.md b/README.md index 4401af7..e8eafd0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ But in both cases, you need to configure .env file. - Create .env.production - Fill all fields in .env.production. If the field is marked as (Optional), you can skip it. -- (Required) To get Discord Token, follow this [guide](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot) +- (Required) To get Discord Token, follow this [guide](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot). After following the guide, you need to enable privileged intents in [Discord Developer Portal.](https://github.com/AlexInCube/AlCoTest/assets/25522245/fdbcdcf1-9501-47f0-93bf-7e76806f623f) - (Optional) To get Spotify Secret and ID, follow this [guide](https://stevesie.com/docs/pages/spotify-client-id-secret-developer-api) - (Optional) To get Yandex Music token, follow this [guide](https://github.com/MarshalX/yandex-music-api/discussions/513) ``` diff --git a/package.json b/package.json index 46f6791..0866aac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aicbot", - "version": "2.4.0", + "version": "2.4.1", "description": "", "main": "build/main.js", "scripts": { @@ -19,28 +19,28 @@ "@distube/soundcloud": "^1.3.3", "@distube/spotify": "^1.5.1", "@distube/yt-dlp": "^1.1.3", - "@distube/ytdl-core": "^4.12.1", + "@distube/ytdl-core": "^4.13.0", "cross-env": "7.0.3", "discord.js": "^14.13.0", "distube": "^4.1.0", "distube-yandex-music-plugin": "^0.2.1", "dotenv": "^16.3.1", "i18next": "^22.5.1", - "i18next-fs-backend": "^2.1.5", - "mongoose": "^7.5.0", + "i18next-fs-backend": "^2.2.0", + "mongoose": "^7.5.2", "node-os-utils": "^1.3.7", "prism-media": "^1.3.5", "sodium-native": "^4.0.4", - "uuid": "^9.0.0", + "uuid": "^9.0.1", "zod": "^3.22.2" }, "devDependencies": { - "@types/node": "^20.5.7", + "@types/node": "^20.6.2", "@types/node-os-utils": "^1.3.1", - "@types/uuid": "^9.0.2", + "@types/uuid": "^9.0.4", "@typescript-eslint/eslint-plugin": "^5.62.0", "@typescript-eslint/parser": "^5.62.0", - "eslint": "^8.48.0", + "eslint": "^8.49.0", "typescript": "^5.2.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 03140d4..a0b6ee6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ dependencies: specifier: ^1.1.3 version: 1.1.3(distube@4.1.0) '@distube/ytdl-core': - specifier: ^4.12.1 - version: 4.12.1 + specifier: ^4.13.0 + version: 4.13.0 cross-env: specifier: 7.0.3 version: 7.0.3 @@ -45,11 +45,11 @@ dependencies: specifier: ^22.5.1 version: 22.5.1 i18next-fs-backend: - specifier: ^2.1.5 - version: 2.1.5 + specifier: ^2.2.0 + version: 2.2.0 mongoose: - specifier: ^7.5.0 - version: 7.5.0 + specifier: ^7.5.2 + version: 7.5.2 node-os-utils: specifier: ^1.3.7 version: 1.3.7 @@ -60,31 +60,31 @@ dependencies: specifier: ^4.0.4 version: 4.0.4 uuid: - specifier: ^9.0.0 - version: 9.0.0 + specifier: ^9.0.1 + version: 9.0.1 zod: specifier: ^3.22.2 version: 3.22.2 devDependencies: '@types/node': - specifier: ^20.5.7 - version: 20.5.7 + specifier: ^20.6.2 + version: 20.6.2 '@types/node-os-utils': specifier: ^1.3.1 version: 1.3.1 '@types/uuid': - specifier: ^9.0.2 - version: 9.0.2 + specifier: ^9.0.4 + version: 9.0.4 '@typescript-eslint/eslint-plugin': specifier: ^5.62.0 - version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2) + version: 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^5.62.0 - version: 5.62.0(eslint@8.48.0)(typescript@5.2.2) + version: 5.62.0(eslint@8.49.0)(typescript@5.2.2) eslint: - specifier: ^8.48.0 - version: 8.48.0 + specifier: ^8.49.0 + version: 8.49.0 typescript: specifier: ^5.2.2 version: 5.2.2 @@ -96,8 +96,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /@babel/runtime@7.22.11: - resolution: {integrity: sha512-ee7jVNlWN09+KftVOu9n7S8gQzD/Z6hN/I8VBRXW4P1+Xe7kJGXMwu8vds4aGIMHZnNbdpSWCfZZtinytpcAvA==} + /@babel/runtime@7.22.15: + resolution: {integrity: sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 @@ -140,7 +140,7 @@ packages: npmlog: 5.0.1 rimraf: 3.0.2 semver: 7.5.4 - tar: 6.1.15 + tar: 6.2.0 transitivePeerDependencies: - encoding - supports-color @@ -166,10 +166,10 @@ packages: '@discordjs/util': 0.3.1 '@sapphire/async-queue': 1.5.0 '@sapphire/snowflake': 3.5.1 - discord-api-types: 0.37.55 + discord-api-types: 0.37.56 file-type: 18.5.0 tslib: 2.6.2 - undici: 5.23.0 + undici: 5.24.0 dev: false /@discordjs/rest@2.0.1: @@ -182,7 +182,7 @@ packages: '@sapphire/snowflake': 3.5.1 '@vladfrangu/async_event_emitter': 2.2.2 discord-api-types: 0.37.50 - magic-bytes.js: 1.0.15 + magic-bytes.js: 1.0.17 tslib: 2.6.2 undici: 5.22.1 dev: false @@ -202,10 +202,10 @@ packages: engines: {node: '>=16.9.0'} dependencies: '@types/ws': 8.5.5 - discord-api-types: 0.37.55 + discord-api-types: 0.37.56 prism-media: 1.3.5(@discordjs/opus@0.9.0) tslib: 2.6.2 - ws: 8.13.0 + ws: 8.14.1 transitivePeerDependencies: - '@discordjs/opus' - bufferutil @@ -227,7 +227,7 @@ packages: '@vladfrangu/async_event_emitter': 2.2.2 discord-api-types: 0.37.50 tslib: 2.6.2 - ws: 8.13.0 + ws: 8.14.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -271,7 +271,7 @@ packages: spotify-uri: 3.0.4 spotify-url-info: 3.2.6 spotify-web-api-node: 5.0.2 - undici: 5.23.0 + undici: 5.24.0 transitivePeerDependencies: - supports-color dev: false @@ -287,49 +287,49 @@ packages: distube: 4.1.0(@discordjs/opus@0.9.0)(@discordjs/voice@0.16.0)(discord.js@14.13.0) execa: 5.1.1 mkdirp: 1.0.4 - undici: 5.23.0 + undici: 5.24.0 dev: false - /@distube/ytdl-core@4.12.1: - resolution: {integrity: sha512-NT7js4ctsN3X3DVuAKM+p1xgjTvGGCxtxSbmhcmMiWYCZyftRgkLvQpn545dAFXzQeT+IzoXsDA2F4zihhLruQ==} + /@distube/ytdl-core@4.13.0: + resolution: {integrity: sha512-ZwH/PNsnca9jvZ6ypFtot8Po9WXUC9gW0iJduzrG3Zr+okGEGwaYE4w3mZ1GGNBe+0P5cmeIgQ9XkLfVKtORLA==} engines: {node: '>=12'} dependencies: - http-cookie-agent: 5.0.4(tough-cookie@4.1.3)(undici@5.23.0) + http-cookie-agent: 5.0.4(tough-cookie@4.1.3)(undici@5.24.0) m3u8stream: 0.8.6 sax: 1.2.4 tough-cookie: 4.1.3 - undici: 5.23.0 + undici: 5.24.0 transitivePeerDependencies: - deasync - supports-color dev: false - /@distube/ytpl@1.1.4: - resolution: {integrity: sha512-ihL6zdZw/+mzQQcqBjAqjUUaW/KW35ZmG7cGGmIuiEUlNZe0MLYed81rjihKRkyCkNjH69LKnW0mkPjzDUCu/g==} + /@distube/ytpl@1.1.5: + resolution: {integrity: sha512-OXjXSpef682v9SuoK7xB9QJ06dX879Ki9jw50rEnbQ2rAQ4dRTg6A0ojx3FOsqJ17nQ5kJdO2Qh57Y9Gqcgngg==} engines: {node: '>=8'} dependencies: miniget: 4.2.3 dev: false - /@distube/ytsr@1.1.10: - resolution: {integrity: sha512-ufwnXV8cNDHzyFtJ3VrhEVtfZyRVA6coTDBPnCSWVBZS3X0M+JGcq1Ptac4tZZ69IMDaqQ7YVrqvAys2bmuoLQ==} + /@distube/ytsr@1.1.11: + resolution: {integrity: sha512-erWiDh5qzzqKNOQkyrD38OT1RbL+SuE0WD2ygMb+CA/uTMajqt2rIGmnKqi1Viz0+4I82T81zlJDd814pVb3jQ==} engines: {node: '>=8'} dependencies: miniget: 4.2.3 dev: false - /@eslint-community/eslint-utils@4.4.0(eslint@8.48.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.49.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.48.0 + eslint: 8.49.0 eslint-visitor-keys: 3.4.3 dev: true - /@eslint-community/regexpp@4.8.0: - resolution: {integrity: sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==} + /@eslint-community/regexpp@4.8.1: + resolution: {integrity: sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true @@ -350,8 +350,8 @@ packages: - supports-color dev: true - /@eslint/js@8.48.0: - resolution: {integrity: sha512-ZSjtmelB7IJfWD2Fvb7+Z+ChTIKWq6kjda95fLcQKNS5aheVHn4IkfgRQE3sIIzTcSLwLcLZUD9UBt+V7+h+Pw==} + /@eslint/js@8.49.0: + resolution: {integrity: sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -426,23 +426,23 @@ packages: resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} dev: false - /@types/json-schema@7.0.12: - resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} + /@types/json-schema@7.0.13: + resolution: {integrity: sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==} dev: true /@types/node-os-utils@1.3.1: resolution: {integrity: sha512-gokG1AaQo78X3f1KXOPAfwbhERX95XL0nhosOhwFck0hZ3BG52Mfch3oj3gAhXuUsou3lwi+ewZWjDo0wshKwQ==} dev: true - /@types/node@20.5.7: - resolution: {integrity: sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==} + /@types/node@20.6.2: + resolution: {integrity: sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==} - /@types/semver@7.5.1: - resolution: {integrity: sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==} + /@types/semver@7.5.2: + resolution: {integrity: sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==} dev: true - /@types/uuid@9.0.2: - resolution: {integrity: sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==} + /@types/uuid@9.0.4: + resolution: {integrity: sha512-zAuJWQflfx6dYJM62vna+Sn5aeSWhh3OB+wfUEACNcqUSc0AGc5JKl+ycL1vrH7frGTXhJchYjE1Hak8L819dA==} dev: true /@types/webidl-conversions@7.0.0: @@ -452,17 +452,17 @@ packages: /@types/whatwg-url@8.2.2: resolution: {integrity: sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==} dependencies: - '@types/node': 20.5.7 + '@types/node': 20.6.2 '@types/webidl-conversions': 7.0.0 dev: false /@types/ws@8.5.5: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: - '@types/node': 20.5.7 + '@types/node': 20.6.2 dev: false - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.48.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -473,13 +473,13 @@ packages: typescript: optional: true dependencies: - '@eslint-community/regexpp': 4.8.0 - '@typescript-eslint/parser': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@eslint-community/regexpp': 4.8.1 + '@typescript-eslint/parser': 5.62.0(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 5.62.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.49.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.48.0 + eslint: 8.49.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -490,7 +490,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.62.0(eslint@8.48.0)(typescript@5.2.2): + /@typescript-eslint/parser@5.62.0(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -504,7 +504,7 @@ packages: '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) debug: 4.3.4 - eslint: 8.48.0 + eslint: 8.49.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -518,7 +518,7 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + /@typescript-eslint/type-utils@5.62.0(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -529,9 +529,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.48.0)(typescript@5.2.2) + '@typescript-eslint/utils': 5.62.0(eslint@8.49.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.48.0 + eslint: 8.49.0 tsutils: 3.21.0(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -564,19 +564,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.48.0)(typescript@5.2.2): + /@typescript-eslint/utils@5.62.0(eslint@8.49.0)(typescript@5.2.2): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@types/json-schema': 7.0.13 + '@types/semver': 7.5.2 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) - eslint: 8.48.0 + eslint: 8.49.0 eslint-scope: 5.1.1 semver: 7.5.4 transitivePeerDependencies: @@ -704,8 +704,8 @@ packages: fill-range: 7.0.1 dev: true - /bson@5.4.0: - resolution: {integrity: sha512-WRZ5SQI5GfUuKnPTNmAYPiKIof3ORXAF4IRU5UcgmivNIon01rWQlw5RUH954dpu8yGL8T59YShVddIPaU/gFA==} + /bson@5.5.0: + resolution: {integrity: sha512-B+QB4YmDx9RStKv8LLSl/aVIEV3nYJc3cJNNTK2Cd1TL+7P+cNpw9mAPeCgc5K+j01Dv6sxUzcITXDx7ZU3F0w==} engines: {node: '>=14.20.1'} dev: false @@ -845,8 +845,8 @@ packages: resolution: {integrity: sha512-X4CDiMnDbA3s3RaUXWXmgAIbY1uxab3fqe3qwzg5XutR3wjqi7M3IkgQbsIBzpqBN2YWr/Qdv7JrFRqSgb4TFg==} dev: false - /discord-api-types@0.37.55: - resolution: {integrity: sha512-XIf8AELxg76AH1WzrgB5ziFyIxSs4tLK1XGjFs4oE6t7M7r1B0Chdylaz76ALhvRXAUBGHGFXu/pKAa5Q+LbQg==} + /discord-api-types@0.37.56: + resolution: {integrity: sha512-Ih3wj0ZTaQxaJRqUEXHMIXfXB86bwMGC0wc2nNsyCJqeo3lC4qnxXtFIsC+IGI46+dSIinuayCAZ6sLEEM02Bw==} dev: false /discord.js@14.13.0: @@ -866,7 +866,7 @@ packages: lodash.snakecase: 4.1.1 tslib: 2.6.2 undici: 5.22.1 - ws: 8.13.0 + ws: 8.14.1 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -897,15 +897,15 @@ packages: dependencies: '@discordjs/opus': 0.9.0 '@discordjs/voice': 0.16.0(@discordjs/opus@0.9.0) - '@distube/ytdl-core': 4.12.1 - '@distube/ytpl': 1.1.4 - '@distube/ytsr': 1.1.10 + '@distube/ytdl-core': 4.13.0 + '@distube/ytpl': 1.1.5 + '@distube/ytsr': 1.1.11 discord.js: 14.13.0 prism-media: /@distube/prism-media@1.0.0(@discordjs/opus@0.9.0) tiny-typed-emitter: 2.1.0 tough-cookie: 4.1.3 tslib: 2.6.2 - undici: 5.23.0 + undici: 5.24.0 transitivePeerDependencies: - deasync - ffmpeg-static @@ -956,15 +956,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.48.0: - resolution: {integrity: sha512-sb6DLeIuRXxeM1YljSe1KEx9/YYeZFQWcV8Rq9HfigmdDEugjLEVEa1ozDjL6YDjBpQHPJxJzze+alxi4T3OLg==} + /eslint@8.49.0: + resolution: {integrity: sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.48.0) - '@eslint-community/regexpp': 4.8.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@eslint-community/regexpp': 4.8.1 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.48.0 + '@eslint/js': 8.49.0 '@humanwhocodes/config-array': 0.11.11 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -1122,13 +1122,13 @@ packages: resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==} engines: {node: '>=12.0.0'} dependencies: - flatted: 3.2.7 + flatted: 3.2.9 keyv: 4.5.3 rimraf: 3.0.2 dev: true - /flatted@3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} dev: true /follow-redirects@1.15.2: @@ -1284,7 +1284,7 @@ packages: resolution: {integrity: sha512-LLase1dHCRMel68/HZTFft0N0wti0epHr3nNY7ynpLbyZpmrKMQ8YIpiOV77TM97cNpC8Wb2n6f66IRggwdWPw==} dev: false - /http-cookie-agent@5.0.4(tough-cookie@4.1.3)(undici@5.23.0): + /http-cookie-agent@5.0.4(tough-cookie@4.1.3)(undici@5.24.0): resolution: {integrity: sha512-OtvikW69RvfyP6Lsequ0fN5R49S+8QcS9zwd58k6VSr6r57T8G29BkPdyrBcSwLq6ExLs9V+rBlfxu7gDstJag==} engines: {node: '>=14.18.0 <15.0.0 || >=16.0.0'} peerDependencies: @@ -1299,7 +1299,7 @@ packages: dependencies: agent-base: 7.1.0 tough-cookie: 4.1.3 - undici: 5.23.0 + undici: 5.24.0 transitivePeerDependencies: - supports-color dev: false @@ -1319,14 +1319,14 @@ packages: engines: {node: '>=10.17.0'} dev: false - /i18next-fs-backend@2.1.5: - resolution: {integrity: sha512-7fgSH8nVhXSBYPHR/W3tEXXhcnwHwNiND4Dfx9knzPzdsWTUTL/TdDVV+DY0dL0asHKLbdoJaXS4LdVW6R8MVQ==} + /i18next-fs-backend@2.2.0: + resolution: {integrity: sha512-VOPHhdDX0M/csRqEw+9Ectpf6wvTIg1MZDfAHxc3JKnAlJz7fcZSAKAeyDohOq0xuLx57esYpJopIvBaRb0Bag==} dev: false /i18next@22.5.1: resolution: {integrity: sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA==} dependencies: - '@babel/runtime': 7.22.11 + '@babel/runtime': 7.22.15 dev: false /ieee754@1.2.1: @@ -1470,8 +1470,8 @@ packages: sax: 1.2.4 dev: false - /magic-bytes.js@1.0.15: - resolution: {integrity: sha512-bpRmwbRHqongRhA+mXzbLWjVy7ylqmfMBYaQkSs6pac0z6hBTvsgrH0r4FBYd/UYVJBmS6Rp/O+oCCQVLzKV1g==} + /magic-bytes.js@1.0.17: + resolution: {integrity: sha512-PEDpPzHpKe5AxkVmQrNPHFRvPN2ELkkj3eIg4IZO9JdhBiAY3aU53lgYXs9j8B7lpza+QiW0UA4QHCH7EskSeg==} dev: false /make-dir@3.1.0: @@ -1596,18 +1596,18 @@ packages: snappy: optional: true dependencies: - bson: 5.4.0 + bson: 5.5.0 mongodb-connection-string-url: 2.6.0 socks: 2.7.1 optionalDependencies: '@mongodb-js/saslprep': 1.1.0 dev: false - /mongoose@7.5.0: - resolution: {integrity: sha512-FpOWOb0AJuaVcplmEyIJ2eCbVGe4gOoniPD+pmft5BrGrNrsFcnYXlERdXtBApGHMHPwD7WbxTyhCbUNr72F3Q==} + /mongoose@7.5.2: + resolution: {integrity: sha512-yEkmI1jfiog7QUvMWz3eB/XoA3/5DrVvSz+z3V5hnq8VtZIHC7ujEV0RKzRXwr8QNMOs+OTB7+aK7R/N/V3yXA==} engines: {node: '>=14.20.1'} dependencies: - bson: 5.4.0 + bson: 5.5.0 kareem: 2.5.1 mongodb: 5.8.1 mpath: 0.9.0 @@ -1959,7 +1959,7 @@ packages: /soundcloud.ts@0.5.2: resolution: {integrity: sha512-/pc72HWYJpSpup+mJBE9pT31JsrMcxJGBlip3Vem+0Fsscg98xh1/7I2nCpAKuMAeV6MVyrisI8TfjO6T7qKJg==} dependencies: - undici: 5.23.0 + undici: 5.24.0 dev: false /sparse-bitfield@3.0.3: @@ -2067,8 +2067,8 @@ packages: has-flag: 4.0.0 dev: true - /tar@6.1.15: - resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==} + /tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} dependencies: chownr: 2.0.0 @@ -2170,8 +2170,8 @@ packages: busboy: 1.6.0 dev: false - /undici@5.23.0: - resolution: {integrity: sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg==} + /undici@5.24.0: + resolution: {integrity: sha512-OKlckxBjFl0oXxcj9FU6oB8fDAaiRUq+D8jrFWGmOfI/gIyjk/IeS75LMzgYKUaeHzLUcYvf9bbJGSrUwTfwwQ==} engines: {node: '>=14.0'} dependencies: busboy: 1.6.0 @@ -2199,8 +2199,8 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: false - /uuid@9.0.0: - resolution: {integrity: sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==} + /uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} hasBin: true dev: false @@ -2244,8 +2244,8 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + /ws@8.14.1: + resolution: {integrity: sha512-4OOseMUq8AzRBI/7SLMUwO+FEDnguetSk7KMb1sHwvF2w2Wv5Hoj0nlifx8vtGsftE/jWHojPy8sMMzYLJ2G/A==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 diff --git a/src/locales/en/commandshandlers.json b/src/locales/en/commandshandlers.json index 6db6303..d41b030 100644 --- a/src/locales/en/commandshandlers.json +++ b/src/locales/en/commandshandlers.json @@ -7,6 +7,6 @@ "user_not_enough_permissions": "You do not have enough permissions on this channel or server", "command_only_in_guilds": "This command working only on servers", "command_only_in_voice": "You need to be in voice channel for executing this command", - "voice_join_in_any_channel": "Зайди в любой голосовой канал", - "voice_join_in_channel": "Зайди в голосовой канал" + "voice_join_in_any_channel": "Please, join in any voice channel", + "voice_join_in_channel": "Please, join in voice channel" } diff --git a/src/locales/en/general.json b/src/locales/en/general.json index 9c32825..563c890 100644 --- a/src/locales/en/general.json +++ b/src/locales/en/general.json @@ -1,4 +1,5 @@ { "error": "Error", - "thinking": "I am thinking" + "thinking": "I am thinking", + "page": "Page" } diff --git a/src/locales/ru/commandshandlers.json b/src/locales/ru/commandshandlers.json index eb7d5d6..bb1121d 100644 --- a/src/locales/ru/commandshandlers.json +++ b/src/locales/ru/commandshandlers.json @@ -6,5 +6,7 @@ "bot_not_enough_permissions_3": "А также попросите администрацию сервера их выдать боту", "user_not_enough_permissions": "У вас недостаточно прав на этом канале или сервере", "command_only_in_guilds": "Эта команда может выполняться только на серверах", - "command_only_in_voice": "Вы должны быть в любом голосовом канале для выполнения этой команды" + "command_only_in_voice": "Вы должны быть в любом голосовом канале для выполнения этой команды", + "voice_join_in_any_channel": "Зайди в любой голосовой канал", + "voice_join_in_channel": "Зайди в голосовой канал" } diff --git a/src/locales/ru/general.json b/src/locales/ru/general.json index 14446c0..dd13a3c 100644 --- a/src/locales/ru/general.json +++ b/src/locales/ru/general.json @@ -1,4 +1,5 @@ { "error": "Ошибка", - "thinking": "Я думаю" + "thinking": "Я думаю", + "page": "Страница" } diff --git a/src/utilities/pagination/pagination.ts b/src/utilities/pagination/pagination.ts index 67f63f1..8e5d801 100644 --- a/src/utilities/pagination/pagination.ts +++ b/src/utilities/pagination/pagination.ts @@ -14,6 +14,7 @@ import { ModalSubmitInteraction } from "discord.js"; import {ButtonTypes, ButtonStyles, ButtonsTypes, PaginationOptions} from "./paginationTypes.js"; +import i18next from "i18next"; const defaultEmojis = { first: "⬅️", @@ -98,12 +99,12 @@ export const pagination = async (options: PaginationOptions) => { const newEmbed = new EmbedBuilder(embedJSON); if (Object.prototype.hasOwnProperty.call(embedJSON, 'footer')) { return newEmbed.setFooter({ - text: `Страница ${currentPage} / ${embeds.length} - ${embedJSON.footer.text}`, + text: `${i18next.t("general:page")} ${currentPage} / ${embeds.length} - ${embedJSON.footer.text}`, iconURL: embedJSON.footer.icon_url }); } return newEmbed.setFooter({ - text: `Страница ${currentPage} / ${embeds.length}` + text: `${i18next.t("general:page")} ${currentPage} / ${embeds.length}` }); } diff --git a/src/utilities/sum.ts b/src/utilities/sum.ts deleted file mode 100644 index 08add17..0000000 --- a/src/utilities/sum.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function sum(a: number, b: number) { - return a + b; -}