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

Unable to show time as "elapsed" #13

Closed
ghost opened this issue Sep 24, 2022 · 1 comment
Closed

Unable to show time as "elapsed" #13

ghost opened this issue Sep 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Sep 24, 2022

Discord RPC question

fun Activity.timestamps(start: Long, end: Long) {
    this.timestamps = Activity.Timestamps(start, end)
}

The discord docs says that to show the time as "elapsed" I have to not pass the endTimeStamp, but if I don't pass it or pass it as null there is an error.
Null can not be a value of a non-null type Long
How do I show the time as "elapsed" instead of "remaining"?

caoimhebyrne added a commit that referenced this issue Sep 25, 2022
The `end` property in the activity timestamps object is actually
nullable, let's make the API reflect that.
@caoimhebyrne
Copy link
Owner

Fixed in 0c852ea - you can use timestamps(System.currentTimeMillis()) to use an elapsed timestamp.

@caoimhebyrne caoimhebyrne self-assigned this Sep 25, 2022
@caoimhebyrne caoimhebyrne added the bug Something isn't working label Sep 25, 2022
@caoimhebyrne caoimhebyrne changed the title (Question) How to show time as "elapsed" Unable to show time as "elapsed" Sep 25, 2022
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

1 participant