diff --git a/commands/Music/play.js b/commands/Music/play.js index 23354441..7e4b897c 100644 --- a/commands/Music/play.js +++ b/commands/Music/play.js @@ -1,5 +1,4 @@ -const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionsBitField } = require("discord.js"), - { QueryType } = require("discord-player-play-dl"); +const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, PermissionsBitField } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Play extends BaseCommand { @@ -45,8 +44,7 @@ class Play extends BaseCommand { try { var searchResult = await client.player.search(query, { - requestedBy: interaction.user, - searchEngine: QueryType.AUTO + requestedBy: interaction.user }); if (!searchResult.tracks[0] || !searchResult) @@ -194,7 +192,7 @@ class Play extends BaseCommand { components: [row1, row2, row3] }); - collector.end(); + collector.stop(); return; } } diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index 55438bfa..76c7daae 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -1,3 +1,7 @@ +### JaBa v4.1.12 +* Исправления + * Временный фикс поиска по ссылкам пока официальный модуль не обновился. + ### JaBa v4.1.11 * Изменения * Команды которые нельзя использовать в ЛС с ботом не будут там отображаться. diff --git a/package-lock.json b/package-lock.json index 08278862..564e3c06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jaba", - "version": "4.1.4", + "version": "4.1.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jaba", - "version": "4.1.4", + "version": "4.1.12", "license": "ISC", "dependencies": { "@discord-player/extractor": "^3.0.2", @@ -20,7 +20,7 @@ "cron": "^2.1.0", "discord-api-types": "^0.37.5", "discord-giveaways": "^6.0.1", - "discord-player-play-dl": "^5.3.6", + "discord-player-play-dl": "^5.3.7", "discord.js": "^14.3.0", "ejs": "^3.1.3", "express": "^4.17.1", @@ -1480,13 +1480,14 @@ } }, "node_modules/discord-player-play-dl": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.6.tgz", - "integrity": "sha512-xHcGl5RvyEP85FqN3EBJT4Ws/D1oA3yhCrbxNhhNI8BTX6eNS7Y0EY1pSTP9GLae/ql6nq106CWr18krj+r0ZA==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.7.tgz", + "integrity": "sha512-lj4QfiewbbU3jxhCfPcHdbOVYFcIiykBYYUxu/7okqp825igcU5Biv4NE8i+HV3XLxRyy6DDfyTQDJdbe61u3w==", "dependencies": { "@discordjs/voice": "^0.11.0", "libsodium-wrappers": "^0.7.10", "play-dl": "^1.9.5", + "play-dl2": "^1.9.6", "spotify-url-info": "^3.1.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.4.0" @@ -3662,6 +3663,17 @@ "node": ">=16.0.0" } }, + "node_modules/play-dl2": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/play-dl2/-/play-dl2-1.9.6.tgz", + "integrity": "sha512-CLx1K5+rIeGFO15OyDD05Uncc7EipLrO2JhbW4+IvopEQUb1z+Cg9ojSp7aVzQUhq/ZHlEnB6G1a+G0gBxT3HQ==", + "dependencies": { + "play-audio": "^0.5.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5837,13 +5849,14 @@ } }, "discord-player-play-dl": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.6.tgz", - "integrity": "sha512-xHcGl5RvyEP85FqN3EBJT4Ws/D1oA3yhCrbxNhhNI8BTX6eNS7Y0EY1pSTP9GLae/ql6nq106CWr18krj+r0ZA==", + "version": "5.3.7", + "resolved": "https://registry.npmjs.org/discord-player-play-dl/-/discord-player-play-dl-5.3.7.tgz", + "integrity": "sha512-lj4QfiewbbU3jxhCfPcHdbOVYFcIiykBYYUxu/7okqp825igcU5Biv4NE8i+HV3XLxRyy6DDfyTQDJdbe61u3w==", "requires": { "@discordjs/voice": "^0.11.0", "libsodium-wrappers": "^0.7.10", "play-dl": "^1.9.5", + "play-dl2": "^1.9.6", "spotify-url-info": "^3.1.2", "tiny-typed-emitter": "^2.1.0", "tslib": "^2.4.0" @@ -7463,6 +7476,14 @@ "play-audio": "^0.5.2" } }, + "play-dl2": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/play-dl2/-/play-dl2-1.9.6.tgz", + "integrity": "sha512-CLx1K5+rIeGFO15OyDD05Uncc7EipLrO2JhbW4+IvopEQUb1z+Cg9ojSp7aVzQUhq/ZHlEnB6G1a+G0gBxT3HQ==", + "requires": { + "play-audio": "^0.5.2" + } + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", diff --git a/package.json b/package.json index 062d6d46..f48d5549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jaba", - "version": "4.1.11", + "version": "4.1.12", "description": "My Discord Bot", "main": "index.js", "private": true, @@ -23,7 +23,7 @@ "cron": "^2.1.0", "discord-api-types": "^0.37.5", "discord-giveaways": "^6.0.1", - "discord-player-play-dl": "^5.3.6", + "discord-player-play-dl": "^5.3.7", "discord.js": "^14.3.0", "ejs": "^3.1.3", "express": "^4.17.1",