krisppurg / dimscord

A Discord Bot & REST Library for Nim.
https://krisppurg.github.io/dimscord/
MIT License
222 stars 22 forks source link

Add state key to ActivityStatus for custom activities #123

Closed xTrayambak closed 4 months ago

xTrayambak commented 4 months ago

This PR adds a state to ActivityStatus. This is necessary for custom activities, as specified by the Discord documentation.

This is how it is meant to be used (inside the onReady event)

await shard.updateStatus(
    activity = some ActivityStatus(
        name: "Custom Status", 
        state: some "Woohoo!", 
        kind: atCustom
    ), 
    status = "idle"
)

The name must always be "Custom Status", otherwise state will be ignored!