Live stream only plays for 6 hours and then stream ends
TLDR: Getting a 24/7 discord bot running I currently have a discord bot which makes use of ytdl-core and the stream will only run for 6 hours which is one of the limitations for this package. You can see the code I am using (Here) Inside "commands/music/play.js" I modified some code hoping to run the playSong would run on after timeout and refresh the stream although I had no success. Does anybody know if there is a workaround for this?
Thanks -C
do you mean a livestream will only run for 6 hours, a video that is longer than 6 hours will only run for 6 hours, or the bot will only play music for 6 hours and then not work?
The bot will only play the music for 6 hours and im trying to stream a 24/7 one I assumed it was something to do with this package's limitations.
it's meant to play a 24/7 stream forever, so stopping at 6 hrs looks like an error
do you get a specific error or message after 6 hours?
@fent I get the same issue but it is more like after 1hr it stops playing. and no there's no error just decides to stop playing. maybe Nodejs kills the process but I don't think that's the case. Also the bot is fully functional even after this has happened just run the play command again and it will play the song.
I'm no longer using the same bot anymore and moved over to using this instead. However I did try to catch errors and wasn't successful. Tried to boot up the bot again and ran into some Youtube API Quota errors so I'll get back to you when this is all working again. @amitojsingh366 Just out of curiosity do you have a link to the package that you're using?
@cavanbecksmith link to the package that i'm using? Do you mean like the bot source code? If that's the case I don't use 3rd party code, I wrote the bot myself (Making me think that its some noobie mistake I've done that causes this).
@amitojsingh366 Ok no worries. To rephrase that I was just wondering mostly if you have a gh repo to link to. I personally haven't developed discord bots (only used others code) however I know my way around node.js so you probably know a bit more than me with using node-ytdl-core. I'm hoping to dive in and potentially having a go building a bot from scratch so I can break things down and pinpoint the issue but I'll have to get back to you about that at a later date.
@cavanbecksmith Ohk. So the answer to your question is no, I don't have a GitHub repo with the bot's code and even if I did it's so highly spaghetti coded that I assume no one other that me would understand what does what 😬