pub struct Activity { /* private fields */ }
Expand description
Represents a Discord Activity object to be send to Discord application. See https://discord.com/developers/docs/game-sdk/activities#data-models for more information.
Implementations§
Source§impl Activity
impl Activity
Sourcepub fn set_name(&mut self, name: String) -> &mut Self
pub fn set_name(&mut self, name: String) -> &mut Self
Sets a name for the Activity - Will be discarded by Discord App.
Sourcepub fn set_activity_type(
&mut self,
activity_type: Option<ActivityType>,
) -> &mut Self
pub fn set_activity_type( &mut self, activity_type: Option<ActivityType>, ) -> &mut Self
Sets a new ActivityType - Will be discarded by Discord App.
Sourcepub fn set_created_at(&mut self, created_at: Option<u128>) -> &mut Self
pub fn set_created_at(&mut self, created_at: Option<u128>) -> &mut Self
Sets a created_at for the Activity.
Sourcepub fn set_timestamps(&mut self, timestamps: Option<Timestamp>) -> &mut Self
pub fn set_timestamps(&mut self, timestamps: Option<Timestamp>) -> &mut Self
Sets new Timestamps for the Activity.
Sourcepub fn set_application_id(&mut self, application_id: Option<i32>) -> &mut Self
pub fn set_application_id(&mut self, application_id: Option<i32>) -> &mut Self
Sets an Application ID for the Activity - Will be discarded by Discord App.
Sourcepub fn set_details(&mut self, details: Option<String>) -> &mut Self
pub fn set_details(&mut self, details: Option<String>) -> &mut Self
Sets the details for the current Activity.
Sourcepub fn set_state(&mut self, state: Option<String>) -> &mut Self
pub fn set_state(&mut self, state: Option<String>) -> &mut Self
Sets a state for the current Activity.
Sourcepub fn set_emoji(&mut self, emoji: Option<Emoji>) -> &mut Self
pub fn set_emoji(&mut self, emoji: Option<Emoji>) -> &mut Self
Sets an emoji for the current Activity.
Sourcepub fn set_party(&mut self, party: Option<Party>) -> &mut Self
pub fn set_party(&mut self, party: Option<Party>) -> &mut Self
Sets the party count for the current Activity.
Sourcepub fn set_assets(&mut self, assets: Option<Asset>) -> &mut Self
pub fn set_assets(&mut self, assets: Option<Asset>) -> &mut Self
Sets the Image Assets for the current Activity.
Sourcepub fn set_secrets(&mut self, secrets: Option<Secret>) -> &mut Self
pub fn set_secrets(&mut self, secrets: Option<Secret>) -> &mut Self
Sets a Secret for the current Activity.
Sourcepub fn set_instance(&mut self, instance: Option<bool>) -> &mut Self
pub fn set_instance(&mut self, instance: Option<bool>) -> &mut Self
Sets the instance boolean for the current Activity.
Sourcepub fn set_flags(&mut self, flag: Option<ActivityFlag>) -> &mut Self
pub fn set_flags(&mut self, flag: Option<ActivityFlag>) -> &mut Self
Sets the flags for the current Activity.
Sets the Buttons for the current Activity. Up to 2 buttons are supported by Discord.