diff --git a/bot.js b/bot.js index ed1df51..c231c5b 100644 --- a/bot.js +++ b/bot.js @@ -165,7 +165,7 @@ client.on('message', async message => { // Play the video as requested try { //TODO: process the timestamp with ffmpeg or whatever - const dispatcher = connection.play(await ytdl(yturl), { type: 'opus', volume: volume, begin: timestamp}); + const dispatcher = connection.play(await ytdl(yturl, { begin: timestamp }), { type: 'opus', volume: volume}); dispatcher.on('start', () => { console.log(`Playing ${yturl}`); }); dispatcher.on('finish', () => { console.log(`Finished ${yturl}`); }); dispatcher.on('error', console.error);