chebro / discord-voice-recorder

A nifty script that can pipe out audio from a discord voice channel to your local storage. A discord voice recorder!
MIT License
116 stars 39 forks source link

i keep getting this error every time the bot joins the vc #19

Open lunacyhillstar opened 3 years ago

lunacyhillstar commented 3 years ago

UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found!

chebro commented 3 years ago

You can safely ignore the warning, it is because you do not have ffmpeg installed on your system. If you want to get rid of the warning, installing ffmpeg would solve it.

I had removed ffmpeg as a system dependency from the readme since ffmpeg-static exists under node_modules, however it discord.js seems to be looking for a system level dependency to play the audio initially, I'll update this in the readme sometime soon!

astariul commented 3 years ago

For me when I ignored the warning, the bot was crashing with the following stack trace :

(node:15696) UnhandledPromiseRejectionWarning: Error: FFmpeg/avconv not found! at Function.getInfo (C:\Users\remon\Documents\workspace\discord-voice-recorder\node_modules\prism-media\src\core\FFmpeg.js:143:11) at new FFmpeg (C:\Users\remon\Documents\workspace\discord-voice-recorder\node_modules\prism-media\src\core\FFmpeg.js:45:27) at AudioPlayer.playUnknown (C:\Users\remon\Documents\workspace\discord-voice-recorder\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
at VoiceConnection.play (C:\Users\remon\Documents\workspace\discord-voice-recorder\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
at C:\Users\remon\Documents\workspace\discord-voice-recorder\bin\commands.js:24:37 at processTicksAndRejections (internal/process/task_queues.js:95:5) (Use node --trace-warnings ... to show where the warning was created) (node:15696) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:15696) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


I had to comment the line of code that play a sounds (on enter/exit) to make it work without installing ffmpeg.