Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Nov 14, 2023
1 parent c3cf8a2 commit 9aef5e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ impl EventHandler for Handler {

if msg.content.starts_with("~say ") {
match msg.guild_id {
Ok(id) => {
let has_mod_role = msg.author.has_role(&context, id, MOD_ROLE).await.unwrap_or_else(false);
Some(id) => {
let has_mod_role = msg.author.has_role(&context, id, MOD_ROLE).await.unwrap_or(false);

if has_mod_role {
let message = msg.content.replace("~say ", "");
Expand All @@ -121,7 +121,7 @@ impl EventHandler for Handler {
println!("User {} tried to say something", msg.author.id);
}
},
Err(_) => println!("No Guild ID found!")
None(_) => println!("No Guild ID found!")
}
}
}
Expand Down

0 comments on commit 9aef5e8

Please sign in to comment.