Skip to main content

timed/
timed.rs

1// SPDX-License-Identifier: MIT
2
3use std::time::Duration;
4
5use filthy_rich::ipc::DiscordIPC;
6use tokio::time::sleep;
7
8#[tokio::main]
9async fn main() {
10    let mut client = DiscordIPC::new("1463450870480900160").await.unwrap();
11
12    client.run().await.unwrap();
13
14    client
15        .set_activity("this runs", "for ten seconds")
16        .await
17        .unwrap();
18    sleep(Duration::from_secs(5)).await;
19    client.set_activity("believe it", "or not").await.unwrap();
20    sleep(Duration::from_secs(5)).await;
21}