Jazz2::UI::DiscordRpcClient class

Allows interactions with running Discord client.

Public types

struct RichPresence
Rich presence description.

Public static functions

static auto Get() -> DiscordRpcClient&
Returns static instance of DiscordRpcClient.

Constructors, destructors, conversion operators

DiscordRpcClient()
~DiscordRpcClient()

Public functions

auto Connect(StringView clientId) -> bool
Connects to a local Discord client.
void Disconnect()
Disconnects from a local Discord client.
auto IsSupported() const -> bool
Returns true if Discord is running and connection is active.
auto GetUserId() const -> std::uint64_t
Returns a user ID of the logged-in user.
auto GetUserDisplayName() const -> StringView
Returns a display name of the logged-in user.
auto SetRichPresence(const RichPresence& richPresence) -> bool
Sets rich presence.