jack3898 / discord-youtube-bot-2

A powerful Discord YouTube Bot.
0 stars 0 forks source link

Remove music from queue when it has been listened #7

Closed naftis closed 2 years ago

naftis commented 2 years ago

Could the current song that has been played or skipped be removed from the queue after? Currently when the queue has been finished and a new song is played, the old queue starts playing after that. I'd rather have the queue be very forgetful, like Spotify queue -like, rather than Spotify playlist -like.

Would this make sense to be configurable or just default?

jack3898 commented 2 years ago

Hey again @naftis!

Funnily enough that is what used to happen. I do think some optimisation to the user experience needs to happen. That is one thing I need to implement.

I agree your suggestion needs to be implemented and I'll close this issue when it has. 🙂

Jack

jack3898 commented 2 years ago

I have implemented this feature in the latest commit ecbe2d9e66b4b99686726aa79abeec335a518622

Naftis, by default the old system will remain. But you can change the config in src/config/config.ts The new option is called forgetItemsOnFinish

I will make an options command eventually that will allow users to change these via the bot but that day is not today 😂

giorgionegro commented 2 years ago

It seams to me that the last song will not be removed no matter what, i add a workaround adding

if (config.purgeQueueOnFinish) {
            await this.queue.purge(); //probably you could remove the only item on the list but i don't know how
}

at the end of handleFinish() and adding the relative config but it doesn't seams right