Expand description
This is the API reference page for filthy-rich.
§Getting Started
Please refer to either of these two structs for implementing Rich Presence functionality in your app:
PresenceRunner - core runner for rich presence
PresenceClient - client/messenger instance used for sending activity and closing updates
Extra types are stored in the types module whereas the error enums and their variants are in the errors module respectively.
§Looking for Discord’s documentation?
The groundwork of this project has been done using the official Discord RPC documentation page. Do note that not all features are/will be implemented as most of them are not fully implemented in Discord itself on a client basis.
§Examples
Library examples can be found in this directory on GitHub.
Modules§
- errors
- Core error types module for filthy-rich.
- types
- Core types related to filthy-rich. Used in conjunction with the core imports.
Macros§
- ds
- Generates a function
$namewhich returns anOption<&str>by dereferencing the$namefield of a struct. - nf
- Generates a function
$namewhich takes a$paramand sets the$namefield of a struct to be aNone-filteredString.
Structs§
- Presence
Client - A client handle for communicating with
super::PresenceRunnerand its inner loop. - Presence
Runner - A runner that manages the Discord RPC background task. Create a runner, configure it, run it to get a client handle, then clone the handle for sharing.