Skip to content

Commit

Permalink
Revert "Temporary workaround until the SU lets me do training"
Browse files Browse the repository at this point in the history
This reverts commit 93ebd2a.
  • Loading branch information
jmshrv committed Sep 9, 2024
1 parent 93ebd2a commit b9c3e5b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,12 @@ pub async fn verify(
) -> Result<(), Error> {
// We do these awkward scoped accesses to members because Rust doesn't like
// holding mutexes past async calls
// let is_member = {
// let members = ctx.data().members.lock().unwrap();
// members
// .iter()
// .any(|student| student.student_id == student_id)
// };
let is_member = true;
let is_member = {
let members = ctx.data().members.lock().unwrap();
members
.iter()
.any(|student| student.student_id == student_id)
};

if is_member {
println!("Found member {student_id} in cache");
Expand Down Expand Up @@ -82,8 +81,7 @@ pub async fn verify(
}

async fn add_role(ctx: Context<'_>) -> Result<(), Error> {
ctx.say("The SU broke the bot so I'm assuming you're a HackSoc member (if you're not, please join anyway at https://hacksoc.net/join 🥺). Welcome to HackSoc :)")
.await?;
ctx.say("Verified! Welcome to HackSoc :)").await?;

if let Some(mut author) = ctx.author_member().await {
author
Expand Down

0 comments on commit b9c3e5b

Please sign in to comment.