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

.playTrack() will not change the boolean value of .paused in v4.0.1 #175

Open
blackink7777 opened this issue Apr 15, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@blackink7777
Copy link

I don't know if this is a logic error on my part or a bug haha

When I was making a function to determine whether to stop music,
I accidentally discovered that after I used the .setPaused(true) function,
I directly used the.playTrack(options: {noReplace: false}) function to play new music (that is, I would Replace the current music and play),
at this point I use the .paused logic to determine if the music is not playing and will return a true value, but this is obviously wrong.

await this.connection[guildId].playTrack({
    track: result.data.encoded,
    options: {
         volume: 20,
         noReplace: false
    }
});
console.log(this.connection[guildId]?.paused) // return: false
this.connection[guildId].setPaused(true)
console.log(this.connection[guildId]?.paused) // return: true
await this.connection[guildId].playTrack({
    track: result.data.encoded,
    options: {
         volume: 20,
         noReplace: false
    }
});
console.log(this.connection[guildId]?.paused) // return: true

If the problem is solved please remember to remind me, love you :>

@blackink7777 blackink7777 changed the title .playTrack() will not change the boolean value of .paused .playTrack() will not change the boolean value of .paused in v4.0.1 Apr 15, 2024
@Deivu Deivu added the bug Something isn't working label Apr 16, 2024
@Deivu
Copy link
Member

Deivu commented Apr 18, 2024

See latest commits and see if this fixes your issue

@Deivu Deivu self-assigned this Apr 18, 2024
blackink7777 added a commit to blackink7777/Shoukaku that referenced this issue Apr 30, 2024
.playTrack() will not change the boolean value of .paused
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

2 participants