EmbarkStudios / discord-sdk

An open implementation of the Discord Game SDK in Rust
Apache License 2.0
150 stars 10 forks source link

Flesh out + examples #5

Closed Jake-Shadle closed 3 years ago

Jake-Shadle commented 3 years ago

Large refactoring both internally in the SDK but also the whole repo in order to have isolated examples that can have their own dependencies, but can still be run with a simple cargo run --example <name>.

This also adds some "helper" DiscordHandler implementations both for testing and "real" usage which are now used in tests/examples.

Adds a super simple LobbyStates helper that can be used to maintain the state of the lobbies as events are sent from Discord to show the state of members/metadata/etc. Users can use this or roll their own if they want to, unlike the official SDK which maintains the lobby state itself and has awkward methods to read the state from the SDK.

Added 2 more examples: