Just-Some-Bots / MusicBot

:musical_note: The original MusicBot for Discord (formerly SexualRhinoceros/MusicBot)
https://just-some-bots.github.io/MusicBot/
MIT License
3.12k stars 2.35k forks source link

Constant "Connected to ..." message when loading playlists #2296

Closed DarkTerrorWolf closed 1 year ago

DarkTerrorWolf commented 2 years ago

What went wrong?

The music bot fires up and runs perfectly normal... until you attempt to !play (spotify playlist here). the bot starts processing this playlist and as it does calls the cmd_summon command after every load of the song either from download or cache. This started showing up after I called the update.sh command due to bot forgetting its in a discord channel with other people at random.

Snip of the Log.last file since github doesn't allow me to upload it

image

and here is a snip of the discord side of the output

image

How do we reproduce this?

Start the bot using run.sh play (spotify playlist)

Which version of the bot are you using?

release-151221

Which operating system are you using?

Ubuntu 18.04 or higher

Just checking...

sk33ny commented 2 years ago

I'm also having this issue

Xplodin commented 1 year ago

how do you fix this on review branch?

DestinyofYeet commented 1 year ago

Have you updated the repository?

Xplodin commented 1 year ago

there has not been an update in almost a year..

DestinyofYeet commented 1 year ago

While true, I do think you were running an older version of the master branch. That aside, you should try the review branch and see if your issue persists.

git checkout review

Xplodin commented 1 year ago

already am on the review branch. This specific issue came up on me quite a few weeks after using the bot.

DestinyofYeet commented 1 year ago

Very interesting behaviour. Unfortunately I don't run the bot for an extend period of time anymore, so I can't replicate the issue.

Did this issue continue after a restart?

Xplodin commented 1 year ago

Very interesting behaviour. Unfortunately I don't run the bot for an extend period of time anymore, so I can't replicate the issue.

Did this issue continue after a restart?

Yeah, it does it only with spotify. YT playlists tend to take quite a long time to load depending on size. But sometimes it just wont play the playlist

YesImAk commented 1 year ago

having the same issue

DestinyofYeet commented 1 year ago

When this issue appears again, send in the discord.log and musicbot.log files.

YesImAk commented 1 year ago

it happens whenever I play Spotify playlist

delta440 commented 1 year ago

I was having the same issue, everytime it looked up/downloaded a song from a spotify playlist it would spam the "Connected to " line. I commented out this block:

            voice_channel = author.voice.channel if author.voice else None
            response = await self.cmd_summon(
                channel, channel.guild, author, voice_channel
            )  # @TheerapakG: As far as I know voice_channel param is unused
            if self.config.embeds:
                content = self._gen_embed()
                content.title = "summon"
                content.description = response.content
            else:
                content = response.content
            await self.safe_send_message(
                channel,
                content,
                expire_in=response.delete_after if self.config.delete_messages else 0,
            )
            player = self.get_player_in(channel.guild)

Honestly I didn't put much thought into it since it seemed like this would just break the auto summon feature, but this fixed it. Hopefully that narrows it down

BabyBoySnow commented 1 year ago

Should be fixed in review! https://github.com/Just-Some-Bots/MusicBot/commit/daa73be5681abe541aef9fb6460eeea777efcddf