fix: member not in guild crashed birthday party
This commit is contained in:
parent
54b4dc9a13
commit
9ef41fdfec
1 changed files with 6 additions and 3 deletions
|
@ -138,9 +138,12 @@ async fn notice(http: Arc<Http>) -> anyhow::Result<()> {
|
||||||
|
|
||||||
for bd in &birtdays {
|
for bd in &birtdays {
|
||||||
let user_id = UserId::new(bd.id);
|
let user_id = UserId::new(bd.id);
|
||||||
guild_id.member(http.clone(), user_id).await?;
|
match guild_id.member(http.clone(), user_id).await {
|
||||||
|
Ok(_) => (),
|
||||||
|
Err(_) => continue
|
||||||
|
};
|
||||||
|
|
||||||
celebrate_birthday(guild_id, user_id, bd.nick.as_str(), http.clone()).await?;
|
let _ = celebrate_birthday(guild_id, user_id, bd.nick.as_str(), http.clone()).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO if has year delete it from announce and delete
|
// TODO if has year delete it from announce and delete
|
||||||
|
@ -150,7 +153,7 @@ async fn notice(http: Arc<Http>) -> anyhow::Result<()> {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
announce_event(guild_id, e.name.as_str(), e.special_message.as_str(), http.clone()).await?;
|
let _ = announce_event(guild_id, e.name.as_str(), e.special_message.as_str(), http.clone()).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue