use discord_rich_presence::{activity, DiscordIpc, DiscordIpcClient}; use std::error::Error; #[test] fn test_models() -> Result<(), Box> { let mut client = DiscordIpcClient::new("771124766517755954")?; client.connect()?; let activity = activity::Activity::new() .state("A test") .details("A placeholder") .assets( activity::Assets::new() .large_image("large-image") .large_text("Large text"), ) .buttons(vec![activity::Button::new( "A button", "https://github.com", )]); client.set_activity(activity)?; std::thread::sleep(std::time::Duration::from_secs(10)); client.close()?; Ok(()) }