Skip to content

Timestamps on stats and player state breaks a .NET lavalink wrapper #30

@heitorgcosta

Description

@heitorgcosta

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(), from Util.ts (uptime field), and the state() getter from worker.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 a DateTimeOffset (e.g. an int).
The one from state() is sent as a string, but the parser also expects a value to be converted to DateTimeOffset.

Doing either a Math.trunc or Math.floor on both seems to fix the issue, but I'm not sure if that would cause issues with other wrappers out there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions