Fiddlekins / podbot

A Discord bot designed to record voice chat audio, aimed at recording a specific podcast
82 stars 16 forks source link

decodeOpus.js is not working #5

Closed derdaisuke closed 7 years ago

derdaisuke commented 7 years ago

Error Log: daisuke@daisuke-server:/home/discord/podbot$ node decodeOpus.js podcasts/269590094065827840-1492712698088/ /home/discord/podbot/decodeOpus.js:51 files.forEach((file) => { ^

TypeError: Cannot read property 'forEach' of undefined at fs.readdir (/home/discord/podbot/decodeOpus.js:51:8) at FSReqWrap.oncomplete (fs.js:114:15)

Fiddlekins commented 7 years ago

Basically the readdir didn't work for some reason and I didn't bother coding in error handling, so it crashed on files being undefined instead.

I've just committed a patch that means you'll get a more relevant error message, but you've probably got the folder name wrong.

ttt733 commented 7 years ago

Your issue looks to be that you're including "podcasts/" in your path. It only wants the name of the folder containing the files. So you should be running node decodeOpus.js 269590094065827840-1492712698088/

Fiddlekins commented 7 years ago

Yeah, nice catch, I completely missed that...

derdaisuke commented 7 years ago

Thanks, it works :3