From c9a9e9af024e2a78f07315e7fd1b21feaa54c35a Mon Sep 17 00:00:00 2001 From: KTrain <69028025+KTrain5169@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:12:28 +1000 Subject: [PATCH] support_onboard: update logic so it doesn't break any further Signed-off-by: KTrain <69028025+KTrain5169@users.noreply.github.com> --- src/handlers/event/support_onboard.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/handlers/event/support_onboard.rs b/src/handlers/event/support_onboard.rs index 7ce3496..6bc9197 100644 --- a/src/handlers/event/support_onboard.rs +++ b/src/handlers/event/support_onboard.rs @@ -22,6 +22,12 @@ pub async fn handle(ctx: &Context, thread: &GuildChannel) -> Result<()> { .await .unwrap_or_default() != "launcher-support" + && thread + .parent_id + .ok_or_else(|| eyre!("Couldn't get parent ID from thread {}!", thread.name))? + .name(ctx) + .await + .unwrap_or_default() != "mod-support" { debug!("Not posting onboarding message to threads outside of support");