Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] $playTrack[a url;url] does not add to queue #17

Closed
Mody-0 opened this issue May 26, 2024 · 9 comments
Closed

[BUG] $playTrack[a url;url] does not add to queue #17

Mody-0 opened this issue May 26, 2024 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@Mody-0
Copy link

Mody-0 commented May 26, 2024

Current Behavior

When you play a song via $playTrack[the url;url] you cannot add another song to the queue, using the function again to add to queue will just play another song and skip the current and never add any songs to queue.

Expected Behavior

Using the function while a song is playing should add the second song to queue

Steps To Reproduce

1- Play a song using the url field on $playTrack (I used a url that isn't related to youtube, Spotify.. or any other platform)
2- Try adding another song via the same url field on $playTrack
3- Bot will skip the current song and start playing the song added in step two.

Environment

Aoi.js (v6.8.0 github)
aoi.music (latest from npm)
nodejs (v20.11.1)

Anything else?

No response

@Mody-0 Mody-0 added the bug Something isn't working label May 26, 2024
@USERSATOSHI
Copy link
Member

can u send minimal code that will cause this
@Mody-0

@Mody-0
Copy link
Author

Mody-0 commented May 26, 2024

Sorry I rechecked my code and apparently this behavior occurs because my play command always had $joinVc then starts a $playTrack
and $joinVC instantly kills the current song even if the bot is already in vc apparently

@Mody-0
Copy link
Author

Mody-0 commented May 26, 2024

Sorry for the inconvenience, but can we maybe change how $joinVc behaves when the bot is already in the current VC so it doesn't kill the current song/queue?

@USERSATOSHI
Copy link
Member

we have $hasPlayer for this that gives bot already in vc or not

u can use with old $if

@Mody-0
Copy link
Author

Mody-0 commented May 26, 2024

$hasPlayer returns true even if the bot was disconnected out of the VC though. (unless disconnected through $leaveVC)

@Mody-0
Copy link
Author

Mody-0 commented May 26, 2024

Another issue I have encountered with $playTrack is that when you try to play a song via a yt url it doesn't play, only text works
$playTrack[ayturl;youtube] won't work

@USERSATOSHI
Copy link
Member

USERSATOSHI commented May 26, 2024 via email

@Mody-0
Copy link
Author

Mody-0 commented May 26, 2024

the Yt link needs to be of type: https://youtube.com/watch?v=id

On Mon, 27 May, 2024, 3:39 am Mody-0, @.> wrote: Another issue I have encountered with $playTrack is that when you try to play a song via a yt url it doesn't play, only text works $playTrack[ayturl;youtube] won't work — Reply to this email directly, view it on GitHub <#17 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARRPTYSSD3AP5RITWNSRYGDZEJMRXAVCNFSM6AAAAABIJR34BCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZSGQYTCMJQHE . You are receiving this because you were assigned.Message ID: <aoijs/aoi. @.>

how do you get that type specifically cause the one I got from the share video thing was like https://youtu.be/pZcP-fCwoao?si=WXXHqoD5H6sF9DxK

@Faf4a
Copy link
Member

Faf4a commented Jul 9, 2024

Just split by the / and extract the ID.

@Faf4a Faf4a closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants