Skip to main content

Module presence

Module presence 

Source
Expand description

Presence (specification §10.5): who is online, idle or do-not-disturb, and doing what (“Playing chess”, “Listening to lofi radio”). The cache follows presence.list and every signal.presence; a member missing from it is offline. Custom status text is part of the member object (member.status.set, §8.3).

Structs§

Activity
An activity (§10.5).
Presence
A member’s presence as everyone else sees it (invisible members look Offline).

Enums§

ActivityType
What the member is doing.
Status
Presence status (§10.5), in the §7 tagged form. A client sends online, idle, dnd or invisible (offline from a client means invisible); others only ever see online, idle, dnd and offline (invisible members and members without a connection).

Functions§

activity
An activity of kind named name, for Client::set_presence. Set details, state, started_at, url (streaming) or emoji (custom) on it as needed.
line
“Playing {name}”, “Streaming {name}”, “Listening to {name}”, “Watching {name}”, “Competing in {name}”, or {emoji} {name} for a custom one.