Struct presence::Activity
zaun_bot::presence::Activity · Struct
pub struct Activity(…)What the bot is doing: build one with Activity::playing, Activity::listening, …
Methods
Section titled “Methods”playing
Section titled “playing”pub fn playing<impl Into<String>>(name: impl Into<String>) -> Self“Playing {name}”.
streaming
Section titled “streaming”pub fn streaming<impl Into<String>, impl Into<String>>(name: impl Into<String>, url: impl Into<String>) -> Self“Streaming {name}”, with an https:// link members may open (after confirming).
listening
Section titled “listening”pub fn listening<impl Into<String>>(name: impl Into<String>) -> Self“Listening to {name}”.
watching
Section titled “watching”pub fn watching<impl Into<String>>(name: impl Into<String>) -> Self“Watching {name}”.
competing
Section titled “competing”pub fn competing<impl Into<String>>(name: impl Into<String>) -> Self“Competing in {name}”.
custom
Section titled “custom”pub fn custom<impl Into<String>>(text: impl Into<String>) -> SelfFree text, with an optional emoji (Activity::emoji).
details
Section titled “details”pub fn details<impl Into<String>>(self, details: impl Into<String>) -> SelfA second line, e.g. the track (≤ 128 characters).
pub fn state<impl Into<String>>(self, state: impl Into<String>) -> SelfA third line, e.g. the artist (≤ 128 characters).
started_at
Section titled “started_at”pub fn started_at(self, ms: u64) -> SelfWhen it started, ms since the epoch (clients show the elapsed time).
pub fn emoji<impl Into<String>>(self, emoji: impl Into<String>) -> SelfA Unicode emoji, for Activity::custom only.
Trait implementations
Section titled “Trait implementations”Clone, Debug