jack3898 / discord-youtube-bot-2

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

Allow queueing with /play rather than denying the action #8

Closed naftis closed 2 years ago

naftis commented 2 years ago

I've noticed that my friends tend to try to say /play when they wanna add something to the queue:

image

Could it act also as an /enqueue if something is already playing?

naftis commented 2 years ago

Now when I look at the code, I see that it actually does this already, unless an interface is busy https://github.com/jack3898/discord-youtube-bot-2/blob/be51690eb3cf82eee78d24ae1233f3bdfc96f3a6/src/commands/modules/Play.ts#L25

The definition of a busy interface seems to be when the bot is playing music. Could we remove that above line of code altogether?

jack3898 commented 2 years ago

Yeah that suggestion makes sense. The current implementation flat out isn't very good is it? 😂

I will also amend the behaviour of /play to align with your suggestion!

jack3898 commented 2 years ago

I also forgot to mention in my previous message that /play actually adds the item to position 1 in the queue as a way to get the song to play straight away when it joins. So the original intent of being busy is that you wouldn't add the item to position 1 whilst the queue is currently running. But it REALLY isn't hard to change the logic to making it add it to the end of the queue when it is busy!! Probably a 5 minute job, not even that haha

jack3898 commented 2 years ago

All fixed in commit ae1e3cdd0b4cecdded98d9a57972e75aa1846851 🙂

naftis commented 2 years ago

Confirmed to be working. Thank you!