Struct discord_sdk::activity::Assets
source · pub struct Assets {
pub large_image: Option<String>,
pub large_text: Option<String>,
pub small_image: Option<String>,
pub small_text: Option<String>,
}
Expand description
The custom art assets to be used in the user’s profile when the activity is set. These assets need to be already uploaded to Discord in the application’s developer settings.
Fields§
§large_image: Option<String>
§large_text: Option<String>
§small_image: Option<String>
§small_text: Option<String>
Implementations§
source§impl Assets
impl Assets
sourcepub fn large(
self,
key: impl Into<String>,
text: Option<impl Into<String>>
) -> Self
pub fn large( self, key: impl Into<String>, text: Option<impl Into<String>> ) -> Self
Sets the large image and optional text to use for the rich presence profile
Key images are limited to 32 bytes on the server, and any keys over that are discarded, however, URL-proxied keys have no such limit. The image text is limited to 128 bytes and will be truncated if longer than that.
sourcepub fn small(
self,
key: impl Into<String>,
text: Option<impl Into<String>>
) -> Self
pub fn small( self, key: impl Into<String>, text: Option<impl Into<String>> ) -> Self
Sets the small image and optional text to use for the rich presence profile
Key images are limited to 32 bytes on the server, and any keys over that are discarded, however, URL-proxied keys have no such limit. The image text is limited to 128 bytes and will be truncated if longer than that.