support_onboard: check if bot has already joined thread

This commit is contained in:
seth 2024-03-03 18:46:34 -05:00
parent 915ef54dc3
commit cd1e3220c7
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
3 changed files with 32 additions and 5 deletions

View file

@ -15,7 +15,7 @@ mod support_onboard;
pub async fn handle(
ctx: &Context,
event: &FullEvent,
_: FrameworkContext<'_, Data, Report>,
framework: FrameworkContext<'_, Data, Report>,
data: &Data,
) -> Result<()> {
match event {
@ -57,7 +57,7 @@ pub async fn handle(
}
FullEvent::ThreadCreate { thread } => {
support_onboard::handle(ctx, thread).await?;
support_onboard::handle(ctx, thread, framework).await?;
}
_ => {}