feature: add StartedAt, EndsAt, Elapsed and Remaining to SpotifyGame. (#1414)
* Fixed GetUsersAsync to use MaxUsersPerBatch const as limit instead of MaxMessagesPerBatch. Requests are now returning up to 1000 guild user entities instead of the previous 100. * Added StartedAt and EndsAt timespans for SpotifyGame. They make it possible to expose track's Elapsed and Remaining properties. * Moved Duration to be initialized within model construction. * Updated StartedAt and EndsAt comments.
This commit is contained in:
committed by
Christopher F
parent
e627f0780a
commit
2bba324143
@@ -38,6 +38,8 @@ namespace Discord.WebSocket
|
||||
AlbumTitle = albumText,
|
||||
TrackTitle = model.Details.GetValueOrDefault(),
|
||||
Artists = model.State.GetValueOrDefault()?.Split(';').Select(x=>x?.Trim()).ToImmutableArray(),
|
||||
StartedAt = timestamps?.Start,
|
||||
EndsAt = timestamps?.End,
|
||||
Duration = timestamps?.End - timestamps?.Start,
|
||||
AlbumArtUrl = albumArtId != null ? CDN.GetSpotifyAlbumArtUrl(albumArtId) : null,
|
||||
Type = ActivityType.Listening,
|
||||
|
||||
Reference in New Issue
Block a user