Struct discord_sdk::activity::ActivityBuilder [−][src]
pub struct ActivityBuilder { /* fields omitted */ }
Implementations
The user’s currenty party status, eg. “Playing Solo”.
Limited to 128 bytes.
What the player is doing, eg. “Exploring the Wilds of Outland”.
Limited to 128 bytes.
Set the start timestamp for the activity. If only the start is set, Discord will display XX:XX elapsed
Set the end timestamp for the activity. If only the end is set, Discord will display XX:XX left
pub fn timestamps(
self,
start: Option<impl IntoTimestamp>,
end: Option<impl IntoTimestamp>
) -> Self
pub fn timestamps(
self,
start: Option<impl IntoTimestamp>,
end: Option<impl IntoTimestamp>
) -> Self
The start and end of a “game” or “session”.
The image assets to use for the rich presence profile
pub fn party(
self,
id: impl Into<String>,
current_size: Option<NonZeroU32>,
max_size: Option<NonZeroU32>,
privacy: PartyPrivacy
) -> Self
pub fn party(
self,
id: impl Into<String>,
current_size: Option<NonZeroU32>,
max_size: Option<NonZeroU32>,
privacy: PartyPrivacy
) -> Self
Sets party details such as size and whether it can be joined by others.
Note that the party size will only be set if both size and max are provided, and that the party id is limited to 128 bytes.
Whether this activity is an instanced context, like a match
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ActivityBuilder
impl Send for ActivityBuilder
impl Sync for ActivityBuilder
impl Unpin for ActivityBuilder
impl UnwindSafe for ActivityBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more