Expand description
The bot’s presence and custom status, shown to every member next to its name: “Listening to lofi radio”, “🎵 Type /play”.
use zaun_bot::presence::{self, Activity, Status};
presence::set(Status::Online, Activity::listening("lofi radio").state("ChilledCow"));
presence::set_status_text("Type /play").ok();The host shows a change at most every 3 s; a later call within that time replaces an
earlier one that has not gone out yet. A bot is online, without an activity, when it
starts.
Re-exports§
pub use crate::types::ActivityType;pub use wit::Status;
Structs§
- Activity
- What the bot is doing: build one with
Activity::playing,Activity::listening, …
Functions§
- clear_
status - Clears the custom status.
- set
- Sets the bot’s status and activity (
None: no activity). - set_
status - Sets the custom status text and emoji, cleared by the host at
expires_at(ms) if given. - set_
status_ text - Sets the custom status text, kept until changed.