parent
a9480b9d72
commit
6522a5b4a0
|
@ -34,17 +34,23 @@ fn main() {
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
|
|
||||||
io::stdin().read_line(&mut buf).unwrap();
|
io::stdin().read_line(&mut buf).unwrap();
|
||||||
|
buf.pop();
|
||||||
|
|
||||||
|
if buf.is_empty() {
|
||||||
if let Err(why) = drpc.set_activity(|a| a
|
if let Err(why) = drpc.clear_activity() {
|
||||||
.state(buf)
|
println!("Failed to clear presence: {}", why);
|
||||||
.assets(|ass| ass
|
}
|
||||||
.large_image("ferris_wat")
|
} else {
|
||||||
.large_text("wat.")
|
if let Err(why) = drpc.set_activity(|a| a
|
||||||
.small_image("rusting")
|
.state(buf)
|
||||||
.small_text("rusting...")))
|
.assets(|ass| ass
|
||||||
{
|
.large_image("ferris_wat")
|
||||||
println!("Failed to set presence: {}", why);
|
.large_text("wat.")
|
||||||
|
.small_image("rusting")
|
||||||
|
.small_text("rusting...")))
|
||||||
|
{
|
||||||
|
println!("Failed to set presence: {}", why);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue