mirror of
https://github.com/KaitlynEthylia/Disco
synced 2024-12-01 08:19:13 +00:00
Remove accidental debug prints
This commit is contained in:
parent
148d6617de
commit
7f02c2f047
1 changed files with 0 additions and 18 deletions
18
src/main.rs
18
src/main.rs
|
@ -77,12 +77,6 @@ fn main() {
|
|||
None
|
||||
},
|
||||
};
|
||||
|
||||
match client {
|
||||
Some(_) => println!("AAA"),
|
||||
None => println!("BBB"),
|
||||
};
|
||||
|
||||
if let Some(ref mut client) = client {
|
||||
let mut ret = client.connect();
|
||||
match args.retry_after {
|
||||
|
@ -192,17 +186,14 @@ impl DiscoActivity {
|
|||
}
|
||||
|
||||
fn process(&self, client: &mut DiscordIpcClient) {
|
||||
println!("processing: {self:#?}");
|
||||
if self.active {
|
||||
let mut activity = Activity::new();
|
||||
|
||||
if let Some(val) = &self.state {
|
||||
activity = activity.state(val);
|
||||
print!("0");
|
||||
}
|
||||
if let Some(val) = &self.details {
|
||||
activity = activity.details(val);
|
||||
print!("1");
|
||||
}
|
||||
|
||||
if let Some(val) = &self.timestamp {
|
||||
|
@ -214,7 +205,6 @@ impl DiscoActivity {
|
|||
timestamps = timestamps.end(val);
|
||||
}
|
||||
activity = activity.timestamps(timestamps);
|
||||
print!("2");
|
||||
}
|
||||
|
||||
let mut buttons = Vec::with_capacity(2);
|
||||
|
@ -222,16 +212,13 @@ impl DiscoActivity {
|
|||
if let Some(val) = &self.button1 {
|
||||
buttons.push(Button::new(&val.text, &val.url));
|
||||
buttons_set = true;
|
||||
print!("3");
|
||||
}
|
||||
if let Some(val) = &self.button2 {
|
||||
buttons.push(Button::new(&val.text, &val.url));
|
||||
buttons_set = true;
|
||||
print!("4");
|
||||
}
|
||||
if buttons_set {
|
||||
activity = activity.buttons(buttons);
|
||||
print!("5");
|
||||
}
|
||||
|
||||
let mut assets = Assets::new();
|
||||
|
@ -242,7 +229,6 @@ impl DiscoActivity {
|
|||
}
|
||||
assets = assets.large_image(&val.asset);
|
||||
assets_set = true;
|
||||
print!("6");
|
||||
}
|
||||
if let Some(val) = &self.small_image {
|
||||
if let Some(val) = &val.text {
|
||||
|
@ -250,16 +236,12 @@ impl DiscoActivity {
|
|||
}
|
||||
assets = assets.small_image(&val.asset);
|
||||
assets_set = true;
|
||||
print!("7");
|
||||
}
|
||||
if assets_set {
|
||||
activity = activity.assets(assets);
|
||||
print!("8");
|
||||
}
|
||||
|
||||
println!("setting activity");
|
||||
client.set_activity(activity).unwrap();
|
||||
print!("9");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue