Skip to content

Commit

Permalink
Add some basic print debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jmshrv committed Sep 25, 2023
1 parent dfcc82d commit 1ca6d1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ pub async fn verify(
};

if is_member {
println!("Found member {student_id} in cache");
add_role(ctx).await?;

return Ok(());
}

println!("Refreshing cache to look for {student_id}");

ctx.defer_ephemeral().await?;

let client = SumsClient::new(ctx.data().group_id, &ctx.data().webdriver_address).await?;
Expand All @@ -55,11 +58,14 @@ pub async fn verify(
*ctx.data().members.lock().unwrap() = new_student_list;

if is_now_in_members {
println!("Found member {student_id} in new member list");
add_role(ctx).await?;

return Ok(());
}

println!("Failed to find {student_id} :(");

ctx.say("Not found :(").await?;

Ok(())
Expand Down

0 comments on commit 1ca6d1d

Please sign in to comment.