Skip to content

Commit

Permalink
fix: allow guild missing from cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanccn committed Nov 12, 2024
1 parent 8af3da7 commit 9acddfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handlers/intelligence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ pub async fn handle(ctx: &serenity::Context, message: &serenity::Message) -> Res
}

if let Ok(member) = message.member(&ctx).await {
if !member.permissions(&ctx.cache)?.administrator()
if !member
.permissions(&ctx.cache)
.is_ok_and(|p| p.administrator())
&& !member
.roles
.iter()
Expand Down

0 comments on commit 9acddfb

Please sign in to comment.