use discord_ipc_rp::{Result, activity, DiscordIpc, DiscordIpcClient}; #[test] fn test_updating() -> Result<()> { let mut client = DiscordIpcClient::new("771124766517755954"); client.connect()?; client.set_activity( activity::Activity::new() .state("part 1 (test)") .details("a placeholder") .assets( activity::Assets::new() .large_image("large-image") .large_text("a thing"), ), )?; std::thread::sleep(std::time::Duration::from_secs(2)); client.set_activity( activity::Activity::new() .state("part 2 (test)") .details("a placeholder") .assets( activity::Assets::new() .large_image("small-image") .large_text("a thing"), ), )?; std::thread::sleep(std::time::Duration::from_secs(2)); client.close()?; Ok(()) }