11import { MessageMedia } from "whatsapp-web.js" ;
2- import { Message } from "../types/message"
2+ import { Message } from "../types/message" ;
33import fs from "fs" ;
44import path from "path" ;
55import { exec } from "child_process" ;
6- import { Innertube , UniversalCache , Utils } from "youtubei.js" ;
6+ import { Innertube , UniversalCache , Utils , Types } from "youtubei.js" ;
77import util from "util" ;
88import log from "../components/utils/log" ;
9- import { DownloadOptions } from "youtubei.js/dist/src/types" ;
109import { fileExists } from "../components/utils/file" ;
1110
1211const execPromise = util . promisify ( exec ) ;
@@ -23,7 +22,7 @@ export const info = {
2322async 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 ( "🔍" ) ] ) ;
0 commit comments