Closed NoahDevelops closed 3 years ago
Addition:
The same issue occurs on the latest Master Branch
build.
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file.
Go to npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines in FFMPEG_ARGUEMENTS
array :
'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved
Like this comment and I will understand that your problem is resolved.
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file.
Go to
npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines in
FFMPEG_ARGUEMENTS
array :'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved
Like this comment and I will understand that your problem is resolved.
Didn't work for me unfortunately
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file. Go to
npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines inFFMPEG_ARGUEMENTS
array :'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved Like this comment and I will understand that your problem is resolved.
Didn't work for me unfortunately
Do you have same issue as that of him ??
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file. Go to
npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines inFFMPEG_ARGUEMENTS
array :'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved Like this comment and I will understand that your problem is resolved.
Didn't work for me unfortunately
Do you have same issue as that of him ??
yes
Do you have same issue as that of him ??
yes
This seems mostly resolved by upping the highWaterMark
value. I don't know if that's considered an acceptable solution though.
This seems mostly resolved by upping the
highWaterMark
value. I don't know if that's considered an acceptable solution though. fent/node-ytdl-core#402
Thank you, I'll try
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file.
Go to
npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines in
FFMPEG_ARGUEMENTS
array :'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved
Like this comment and I will understand that your problem is resolved.
This just breaks the player all together, no signal is sent, no green circle, it just breaks the audio all together.
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file. Go to
npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines inFFMPEG_ARGUEMENTS
array :'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved Like this comment and I will understand that your problem is resolved.
This just breaks the player all together, no signal is sent, no green circle, it just breaks the audio all together.
If you are using ytdl-core as streaming , it will definitely crash. I recommend ytdl-core-discord and use the following command :
const ytdl = require('ytdl-core-discord');
async function play(connection, url) {
connection.play(await ytdl(url), { type: 'opus' });
}
If you use ytdl-core-discord along with those FFMPEG_ARGUEMENTS
, there will be ultimate smooth play of audio along with high quality audio stream.
I personally use ytdl-core-discord over ytdl-core, I recommend you to shift to ytdl-core-discord.
Like this comment if this helps to fix your problem.
connection.play(await ytdl(url), { type: 'opus' });
Appreciate the response, I'll run this overnight and see how it goes.
I play a local audio file to my discord bot and every few hours it stops playing music but the console still logs music being played.
This is a issue of youtube as it tries to disconnect the stream before the bot is finished reading the file. Go to
npm-modules/discord.js/src/client/voice/player/BasePlayer.js
And add these lines inFFMPEG_ARGUEMENTS
array :'reconnect', '1', 'reconnect_streamed', '1', 'reconnect_delay_max', '4'
Just re-start your bot and this issue is resolved Like this comment and I will understand that your problem is resolved.
This just breaks the player all together, no signal is sent, no green circle, it just breaks the audio all together.
If you are using ytdl-core as streaming , it will definitely crash. I recommend ytdl-core-discord and use the following command :
const ytdl = require('ytdl-core-discord'); async function play(connection, url) { connection.play(await ytdl(url), { type: 'opus' }); }
If you use ytdl-core-discord along with those
FFMPEG_ARGUEMENTS
, there will be ultimate smooth play of audio along with high quality audio stream.I personally use ytdl-core-discord over ytdl-core, I recommend you to shift to ytdl-core-discord.
Like this comment if this helps to fix your problem.
Issue fixed, appreciate it! :D
Please describe the problem you are having in as much detail as possible:
In a nutshell, I have a Discord Bot that plays music 24/7 in a Stage Channel. It works reliably for up to 6-7+ hours but then proceeds to cease playing audio afterward at a random time. There is no signal received (no green circle), no errors logged in the console, and the bot remains in the channel.
The only thing that can fix this, is restarting the bot entirely. I can even restart the bot while it is still in the channel, and it will start right back up again and start sending audio.
Again, no errors are logged to the console, and there are no outputs from a
try { } catch { }
statement.Include a reproducible code sample here, if possible:
Do keep in mind that this is a recursive function
Further details:
-- discord.js@12.5.0 (github:discordjs/discord.js#a6079bc9ce40ecbb4adace033dbf201897b5459f)
v14.16.0
Windows, Ubuntu, and Debian
Low Priority
Relevant client options:
all
All Non-Privileged Intents
Additional Notes:
I don't think this can be a network issue, as this same issue occurs on my Main Machine, a host that I own, and 2 other Virtual Private Server Hosting Companies. (That being GalaxyGate and SkySilk)