Upgrade na speciální fork play-dl

This commit is contained in:
Histmy 2024-08-20 22:24:16 +02:00
parent af71fbde93
commit 8ba97b397d
Signed by: Histmy
GPG Key ID: AC2E43C463D8F329
3 changed files with 13 additions and 12 deletions

14
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "denim_3001",
"version": "3001.59.0",
"version": "3001.60.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "denim_3001",
"version": "3001.59.0",
"version": "3001.60.0",
"license": "ISC",
"dependencies": {
"@discordjs/voice": "^0.17.0",
@ -14,7 +14,7 @@
"js-levenshtein": "^1.1.6",
"mysql": "^2.18.1",
"opusscript": "^0.1.1",
"play-dl": "^1.9.7",
"play-dl": "https://gitea.deadfish.cz/Histmy/play-dl-fix/archive/main.tar.gz",
"tiny-typed-emitter": "^2.1.0",
"tweetnacl": "^1.0.3",
"valibot": "^0.35.0",
@ -405,12 +405,14 @@
"node_modules/play-audio": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/play-audio/-/play-audio-0.5.2.tgz",
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ=="
"integrity": "sha512-ZAqHUKkQLix2Iga7pPbsf1LpUoBjcpwU93F1l3qBIfxYddQLhxS6GKmS0d3jV8kSVaUbr6NnOEcEMFvuX93SWQ==",
"license": "GPL-3.0"
},
"node_modules/play-dl": {
"version": "1.9.7",
"resolved": "https://registry.npmjs.org/play-dl/-/play-dl-1.9.7.tgz",
"integrity": "sha512-KpgerWxUCY4s9Mhze2qdqPhiqd8Ve6HufpH9mBH3FN+vux55qSh6WJKDabfie8IBHN7lnrAlYcT/UdGax58c2A==",
"resolved": "https://gitea.deadfish.cz/Histmy/play-dl-fix/archive/main.tar.gz",
"integrity": "sha512-YK62RESrfcOXJAE7orKb+D+vs7lJvRur7hq1vPeT4pFH2aJSjI4sGgoefRYDPoM/BCp8VCsC5i11YDpWbW2dMA==",
"license": "GPL-3.0",
"dependencies": {
"play-audio": "^0.5.2"
},

View File

@ -1,6 +1,6 @@
{
"name": "denim_3001",
"version": "3001.59.0",
"version": "3001.60.0",
"description": "Toto je velmi kvalitní bot.",
"repository": {
"url": "https://github.com/Histmy/Denim-Bot/"
@ -18,7 +18,7 @@
"js-levenshtein": "^1.1.6",
"mysql": "^2.18.1",
"opusscript": "^0.1.1",
"play-dl": "^1.9.7",
"play-dl": "https://gitea.deadfish.cz/Histmy/play-dl-fix/archive/main.tar.gz",
"tiny-typed-emitter": "^2.1.0",
"tweetnacl": "^1.0.3",
"valibot": "^0.35.0",

View File

@ -2,8 +2,7 @@
import { AudioPlayerStatus, VoiceConnectionStatus } from "@discordjs/voice";
import { Client } from "discord.js";
import { search, validate, video_basic_info } from "play-dl";
import ytdlko from "ytdl-core";
import { search, stream, validate, video_basic_info } from "play-dl";
import { emouty } from "../utils/emotes";
import { Modul } from "../utils/types";
import { adminLog, log, send } from "../utils/utils";
@ -28,8 +27,8 @@ async function playNext(guildId: string) {
let coZahrat: Hratelny;
if (!item.special) {
const src = ytdlko(item.url, { filter: "audioonly", highWaterMark: 1 << 25 });
coZahrat = { src: src, volume: 1 };
const src = await stream(item.url);
coZahrat = { src: src.stream, volume: 1, type: src.type };
} else {
coZahrat = item.url;
}