-
-
Notifications
You must be signed in to change notification settings - Fork 466
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
feat: Add function to get elapsed time of playing audio on VoiceClient #2587
feat: Add function to get elapsed time of playing audio on VoiceClient #2587
Conversation
Seconds seem really inflexible, what if we returned a |
Sounds reasonable |
…0506/pycord into feat-player-elapsed-time
Can I have a review on this? |
Changed to use loops + an offset to keep track of when loops gets reset |
Signed-off-by: Dorukyum <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find client.elapsed()
to be clearer and simpler, what do you think?
I don't have any preference between client.elapsed() or client.played_time() |
Co-authored-by: Dorukyum <[email protected]> Signed-off-by: felix920506 <[email protected]>
Pycord-Development#2587) * add played_seconds function * Update CHANGELOG.md * style(pre-commit): auto fixes from pre-commit.com hooks * use datetime.timedelta instead of int * add comment * style(pre-commit): auto fixes from pre-commit.com hooks * rename function to reflect change * style(pre-commit): auto fixes from pre-commit.com hooks * don't use different counter * Update discord/voice_client.py Signed-off-by: Dorukyum <[email protected]> * Apply suggestions from code review Co-authored-by: Dorukyum <[email protected]> Signed-off-by: felix920506 <[email protected]> --------- Signed-off-by: felix920506 <[email protected]> Signed-off-by: Dorukyum <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]>
Pycord-Development#2587) * add played_seconds function * Update CHANGELOG.md * style(pre-commit): auto fixes from pre-commit.com hooks * use datetime.timedelta instead of int * add comment * style(pre-commit): auto fixes from pre-commit.com hooks * rename function to reflect change * style(pre-commit): auto fixes from pre-commit.com hooks * don't use different counter * Update discord/voice_client.py Signed-off-by: Dorukyum <[email protected]> * Apply suggestions from code review Co-authored-by: Dorukyum <[email protected]> Signed-off-by: felix920506 <[email protected]> --------- Signed-off-by: felix920506 <[email protected]> Signed-off-by: Dorukyum <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Dorukyum <[email protected]>
Summary
Adds a function to get the elapsed seconds of currently playing audio file
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.