Closed heitorgcosta closed 1 year ago
The LavaLink docs used to say it was a string when I was writing LavaLinkTypes iirc, but it seems like this was updated. I'll fix when I get a chance
Which JSON prop from getStats is expected to be an int? uptime?
Yes, it is uptime
Completed in 1.5.7
Hello! Been experimenting with Volcano since I wanted a lower memory footprint but found an issue with it. Currently I'm developing a bot using Discord.NET and Lavalink4Net as a lavalink wrapper, but the timestamps that comes from both
getStats()
, fromUtil.ts
(uptime field), and thestate()
getter fromworker.ts
(time field) breaks the parsing for Lavalink4Net.The one from
getStats()
sometimes is sent with decimal places, but the parser expects a value that can be converted into aDateTimeOffset
(e.g. an int). The one fromstate()
is sent as a string, but the parser also expects a value to be converted toDateTimeOffset
.Doing either a
Math.trunc
orMath.floor
on both seems to fix the issue, but I'm not sure if that would cause issues with other wrappers out there.