Giter Club home page Giter Club logo

Comments (34)

moonstar-x avatar moonstar-x commented on May 26, 2024

Hey there, how are you starting up the container?

Are you using the docker-compose file I showed you before or are you using the docker-cli directly to create one?

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

I am using the docker-compose file you showed me, and then starting it with docker-compose up -d.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Can you try running docker-compose logs bot and send the output here of the logs from around the time that the bot crashed?

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

This time, it did not crash. It did however start playing up and as a result the playback stopped. Here are a few weird behaviors I am noticing:

  • It is playing Presence updated to: ❙ ❙ Goslow - Returning Home which is not apart of my listed song. I do not believe it actually plays anything.
  • I see a few stream expiring errors.

I did notice that there is no option to carry on playing even when the voice channel is empty. When I ran the bot through VSCode, this is what fixed all the issues. How do I do this when running it on Docker?

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

Here is the log up until the first crash:

bot_1  | (10:23:36 AM) - [INFO] -  User Kerim_77_XD has left 🎧᲼24/7 lofi radio (LL).
bot_1  | (10:23:36 AM) - [INFO] -  Music has been paused because nobody is in my channel.
bot_1  | (10:23:36 AM) - [INFO] -  Presence updated to: ❙ ❙ LlamaLoops - Pokémon & Chill  ~ lofi mix extended version (2 hour loop)
bot_1  | (11:48:16 PM) - [INFO] -  User Meaookung145 has joined 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:16 PM) - [INFO] -  Stream has expired, skipping...
bot_1  | (11:48:18 PM) - [INFO] -  User Meaookung145 has left 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:19 PM) - [INFO] -  User Meaookung145 has joined 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:19 PM) - [INFO] -  Playing (LOCAL): Goslow - Returning Home for 1 user(s) in 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:19 PM) - [INFO] -  Presence updated to: ► Goslow - Returning Home
bot_1  | (11:48:22 PM) - [INFO] -  User Meaookung145 has left 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:22 PM) - [INFO] -  Music has been paused because nobody is in my channel.
bot_1  | (11:48:22 PM) - [INFO] -  Presence updated to: ❙ ❙ Goslow - Returning Home
bot_1  | (11:48:23 PM) - [INFO] -  User Meaookung145 has joined 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:23 PM) - [INFO] -  Music has been resumed.
bot_1  | (11:48:23 PM) - [INFO] -  Presence updated to: ► Goslow - Returning Home
bot_1  | (11:48:27 PM) - [INFO] -  User Meaookung145 has left 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:27 PM) - [INFO] -  Music has been paused because nobody is in my channel.
bot_1  | (11:48:27 PM) - [INFO] -  Presence updated to: ❙ ❙ Goslow - Returning Home
bot_1  | (11:48:28 PM) - [INFO] -  User Meaookung145 has joined 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:28 PM) - [INFO] -  Music has been resumed.
bot_1  | (11:48:28 PM) - [INFO] -  Presence updated to: ► Goslow - Returning Home
bot_1  | (11:48:30 PM) - [INFO] -  User Meaookung145 has left 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:30 PM) - [INFO] -  Music has been paused because nobody is in my channel.
bot_1  | (11:48:30 PM) - [INFO] -  Presence updated to: ❙ ❙ Goslow - Returning Home
bot_1  | (11:48:37 PM) - [INFO] -  User Meaookung145 has joined 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:37 PM) - [INFO] -  Music has been resumed.
bot_1  | (11:48:37 PM) - [INFO] -  Presence updated to: ► Goslow - Returning Home
bot_1  | (11:48:44 PM) - [INFO] -  User Meaookung145 has left 🎧᲼24/7 lofi radio (LL).
bot_1  | (11:48:44 PM) - [INFO] -  Music has been paused because nobody is in my channel.
bot_1  | (11:48:44 PM) - [INFO] -  Presence updated to: ❙ ❙ Goslow - Returning Home
bot_1  | (12:44:18 AM) - [INFO] -  User LlamaLoops has joined 🎧᲼24/7 lofi radio (LL).
bot_1  | (12:44:18 AM) - [INFO] -  Music has been resumed.
bot_1  | (12:44:18 AM) - [INFO] -  Presence updated to: ► Goslow - Returning Home
bot_1  |
bot_1  | > [email protected] start /opt/app
bot_1  | > node ./src/app.js

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

The stream expire warning shows up when the bot resumes playback after it has been paused for like longer than an hour or two, so it skips to the next song.

You can enable the playback even when the channel is empty by adding the environment variable:

DISCORD_PAUSE_ON_EMPTY=false

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

Wonderful, thank you for that. I have made the relevant changes and started the bot up again.

I will keep an eye on it for the next few days and report back here to see if it has fixed the error!

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Here is the log up until the first crash:

Very weird, I would expect an error to show up. It kinda seems like the container got restarted manually.

In any case, I do not remember if you were the person who told me about the PAUSE_ON_EMPTY setting, because if you disable the whole pause functionality almost all random crashing is gone.

But yeah, if you do not care about using some bandwidth constantly, disabling the pause on empty function actually works well.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

Yeah I was the one who posted about disabling the PAUSE_ON_EMPTY setting as it fixed all the issues I was having with playback as it would struggle to resume at times.

Bandwidth is not much of a problem thankfully, I run on unlimited which makes server hosting a lot easier.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Yeah, just as a reminder, you can configure the bot through environment variables inside your docker-compose.yml file, you can check what variable corresponds to what JSON config key here.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

So it is happening again. It seems to start randomy playing this Goslow song which then has no sound

(1:47:20 PM) - [INFO] -  Playing (LOCAL): Goslow - Returning Home for 0 user(s) in 🎧᲼24/7 lofi radio (LL).

(1:47:20 PM) - [INFO] -  Presence updated to: ► Goslow - Returning Home

(4:05:00 PM) - [INFO] -  Playing (LOCAL): LlamaLoops - best anime openings but it's lofi remix extended edition (2 hours) for 0 user(s) in 🎧᲼24/7 lofi radio (LL).

(4:05:00 PM) - [INFO] -  Presence updated to: ► LlamaLoops - best anime openings but it's lofi remix extended edition (2 hours)

(6:44:05 PM) - [INFO] -  Playing (LOCAL): LlamaLoops - best anime openings but it's lofi remix part 3 extended edition (2 hours) for 0 user(s) in 🎧᲼24/7 lofi radio (LL).

(6:44:05 PM) - [INFO] -  Presence updated to: ► LlamaLoops - best anime openings but it's lofi remix part 3 extended edition (2 hours)

(9:04:31 PM) - [INFO] -  Playing (LOCAL): LlamaLoops - Pokémon & Chill  ~ lofi mix extended version (2 hour loop) for 0 user(s) in 🎧᲼24/7 lofi radio (LL).

(9:04:31 PM) - [INFO] -  Presence updated to: ► LlamaLoops - Pokémon & Chill  ~ lofi mix extended version (2 hour loop)

(11:27:04 PM) - [INFO] -  Playing (LOCAL): c0bra - A Sleeping Computer for 0 user(s) in 🎧᲼24/7 lofi radio (LL).

(11:27:04 PM) - [INFO] -  Presence updated to: ► c0bra - A Sleeping Computer

(1:34:48 AM) - [INFO] -  Playing (LOCAL): LlamaLoops - Legend of Zelda lofi mix 🕹️ extended edition (2 hour loop) for 0 user(s) in 🎧᲼24/7 lofi radio (LL).

(1:34:48 AM) - [INFO] -  Presence updated to: ► LlamaLoops - Legend of Zelda lofi mix 🕹️ extended edition (2 hour loop)

(2:21:43 AM) - [INFO] -  User LlamaLoops has joined 🎧᲼24/7 lofi radio (LL).

(2:21:57 AM) - [INFO] -  User LlamaLoops has left 🎧᲼24/7 lofi radio (LL).

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

After this line appears, it stops playing music:

(1:47:20 PM) - [INFO] - Playing (LOCAL): Goslow - Returning Home for 0 user(s) in 🎧᲼24/7 lofi radio (LL

I have no clue where that song is coming from, but if I can remove it then I believe the issue will be fixed. I will confirm this by doing !skip to see if skipping it fixes the bot.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

I am trying all available file types to see if it might be something to do with that. Will update if it crashes again.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

@moonstar-x that seems to be the issue. I tried another file format (mp3) and it did the same. Instead, with the mp3 files it now just says presence updated to with no song.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

It doesn't say "Presence updated to: Local song"?

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

When I switch my files from .OPUS to .MP3, it does. The logs I posted before were before I changed the file format. Now that I have .mp3 files, it simply says Presence updated to: or Presence updated to: Local Song.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Do you mean that just by changing the extension from .opus to .mp3 the name worked?

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

I did not just change the file extension. I redownloaded all the songs in .mp3 format. Previously, when I was using .OPUS format, the bot would stop playing once it updated its presence to Presence updated to: ► Goslow - Returning Home, however now that I have redownloaded the songs as .mp3, the bot stops playing once the presence is updated to Presence updated to: Local Song and/or Presence updated to:.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

So I came to the conclusion that the bot is attempting to play songs that are not there, hence its stopped playback

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Hmmm...

It rather seems interesting that the presence gets changed to Presence updated to: because it would mean that metadata reader does find an entry for the song title but it must be empty most likely.

Though, I've seen some filesystems that create hidden files for certain files, so if you have a file a.mp3 you may have a hidden ._.a.mp3 or something similar.

If you go to your local-music folder and run the command ls -l inside, what do you get? I have a feeling that there may be some hidden *.opus or *.mp3 inside that the bot may be trying to read.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

I tried everything and I am still not able to see any hidden files. I turne don the show hidden files option, run commands on PowerShell and CMD that show all files including hidden and it just lists all songs I have added.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

It seems to happen on song 10/12. I will keep a eye on it to triple check this.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

For some reason, all it says now is Presence updated to: ► Local Song for every single song and still stops playing after a while.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

I do get this on start up:

This bot is designed to work only on one server at a time. If you're seeing this message, it means your bot is in more than a server. Currently, the bot is in 2 servers. Please, remove it from the rest.

However, it is definitely not on any other server as I only own this one.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Are you really sure your bot is in only one server? If you're getting that message it surely means that it is indeed in 2 servers.

Although it shouldn't be too much of a problem since the bot only connects to the channel you tell it to connect (which means obviously one server only) but I'm actually not 100% if just the fact of being in multiple servers is enough to break the player. Though I know that the skip command could be triggered from another server and make the song skip in the one where the bot is playing.

However, I can't really explain why the presence would get updated to something empty when there is no way that the PlayerPresenceManager returned something empty like that unless the player had some sort of unexpected state.

If it's not something related to the files being corrupt or having broken metadata, it could be that the second server is breaking the player.

Try remaking your bot in the developer portal or, if you're comfortable with code, leaving all the servers your bot is in and then re-inviting it.

client.on('ready', () => {
  Promise.all(client.guilds.cache.map((guild) => guild.leave())).then(() => console.log('Finished leaving'));
});

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

Thank you for that all. I am going to get the bot to leave all the servers before I try anything else. From there on, if that does not work, I shall remake it in the developer portal.

In terms of the code, where should I put that?

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

You can put that anywhere inside src/app.js, just run it once and then remove it.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

After running the code, getting the bot to leave all servers, and inviting it back the issue still persists. The error message did go away though.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

Even after getting it to leave the server, every single song just shows:

Presence Updated to: Local Song

I think this has to do with metadata or something along that line because it now can not find information about the song and as always attempts to play a song that is not there hence the silence.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

That's weird. I'm convinced that you must have an audio file that may be hidden, if not in the local-music folder maybe in the local-intermissions folder.

As for the metadata thing, I think it's better that it says 'Local song' and not an empty string because at least the metadata parser worked but didn't find anything.

I cannot reproduce your issue either. I do not get any moment when the bot plays silence or when the metadata doesn't work with opus files.

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

Alright so I kicked the bot, invited it back, started the project from scratch, only had one song that worked and started it. Turns out the metadata issue was due to the songs completely loosing their information. So I fixed that.

Now, the bot will play perfectly for a day or so (playing through terminal now instead of docker), and then just play nothing at all. The presence shows the song with the right tags and information, but in the server it is dead silent.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

I'm aware of that particular issue. Normally the stream expire thing should deal with it but I know it is not perfect.

I think this can be fixed with the update to djs13 but I'm afraid I haven't found the time to work on this. :/

from discord-music-24-7.

DaleJV avatar DaleJV commented on May 26, 2024

I wonder if there is a way to have the program self restart before the time that it would normally expire, for now.

from discord-music-24-7.

moonstar-x avatar moonstar-x commented on May 26, 2024

Hi there, sorry for the long hiatus, I'm trying to make some time during my week for these things.

After some thought it seems that this is a duplicate of #56 so I'm closing this issue.

from discord-music-24-7.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.