Skip to content

Commit 5cb9a01

Browse files
committed
chore: bump youtubei.js to 16.0.1
1 parent 484edfd commit 5cb9a01

4 files changed

Lines changed: 19 additions & 35 deletions

File tree

package-lock.json

Lines changed: 14 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"unbzip2-stream": "^1.4.3",
5757
"undici": "^7.16.0",
5858
"whatsapp-web.js": "^1.31.0",
59-
"youtubei.js": "^15.1.1"
59+
"youtubei.js": "^16.0.1"
6060
},
6161
"devDependencies": {
6262
"@types/cli-progress": "^3.11.6",

src/commands/play.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { MessageMedia } from "whatsapp-web.js";
2-
import { Message } from "../types/message"
2+
import { Message } from "../types/message";
33
import fs from "fs";
44
import path from "path";
55
import { exec } from "child_process";
6-
import { Innertube, UniversalCache, Utils } from "youtubei.js";
6+
import { Innertube, UniversalCache, Utils, Types } from "youtubei.js";
77
import util from "util";
88
import log from "../components/utils/log";
9-
import { DownloadOptions } from "youtubei.js/dist/src/types";
109
import { fileExists } from "../components/utils/file";
1110

1211
const execPromise = util.promisify(exec);
@@ -23,7 +22,7 @@ export const info = {
2322
async function safeDownload(
2423
yt: Innertube,
2524
id: string,
26-
options: DownloadOptions,
25+
options: Types.DownloadOptions,
2726
retries = 3,
2827
) {
2928
for (let attempt = 1; attempt <= retries; attempt++) {
@@ -70,7 +69,6 @@ export default async function (msg: Message): Promise<void> {
7069
const yt = await Innertube.create({
7170
cache: new UniversalCache(true, "./.youtubei"),
7271
generate_session_locally: true,
73-
player_id: "0004de42",
7472
});
7573

7674
const [audio] = await Promise.all([search(yt, query), msg.react("🔍")]);

src/commands/video.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { MessageMedia } from "whatsapp-web.js";
2-
import { Message } from "../types/message"
2+
import { Message } from "../types/message";
33
import fs from "fs";
44
import path from "path";
55
import { Innertube, UniversalCache, Utils } from "youtubei.js";
@@ -62,7 +62,6 @@ export default async function (msg: Message): Promise<void> {
6262
const yt = await Innertube.create({
6363
cache: new UniversalCache(true, "./.youtubei"),
6464
generate_session_locally: true,
65-
player_id: "0004de42",
6665
});
6766

6867
const [video] = await Promise.all([search(yt, query), msg.react("🔍")]);

0 commit comments

Comments
 (0)