From d0bcdf276ac389bec70f51d2b28af641d75eb26e Mon Sep 17 00:00:00 2001 From: KTrain <69028025+KTrain5169@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:55:59 +1000 Subject: [PATCH 1/4] Maybe fix the new support channels not being detected? Signed-off-by: KTrain <69028025+KTrain5169@users.noreply.github.com> --- src/handlers/event/support_onboard.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/handlers/event/support_onboard.rs b/src/handlers/event/support_onboard.rs index f2d2d5f4..51ead4f1 100644 --- a/src/handlers/event/support_onboard.rs +++ b/src/handlers/event/support_onboard.rs @@ -21,7 +21,8 @@ pub async fn handle(ctx: &Context, thread: &GuildChannel) -> Result<()> { .name(ctx) .await .unwrap_or_default() - != "support" + != "launcher-support" + != "mod-support { debug!("Not posting onboarding message to threads outside of support"); return Ok(()); From 24905c6f1b5cfffd88ca227179ef87a58ba64e20 Mon Sep 17 00:00:00 2001 From: KTrain <69028025+KTrain5169@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:56:26 +1000 Subject: [PATCH 2/4] I forgot to include something Signed-off-by: KTrain <69028025+KTrain5169@users.noreply.github.com> --- src/handlers/event/support_onboard.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/event/support_onboard.rs b/src/handlers/event/support_onboard.rs index 51ead4f1..7ce34961 100644 --- a/src/handlers/event/support_onboard.rs +++ b/src/handlers/event/support_onboard.rs @@ -22,7 +22,7 @@ pub async fn handle(ctx: &Context, thread: &GuildChannel) -> Result<()> { .await .unwrap_or_default() != "launcher-support" - != "mod-support + != "mod-support" { debug!("Not posting onboarding message to threads outside of support"); return Ok(()); 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 3/4] 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 7ce34961..6bc9197a 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"); From e9d472efcd60c93698941571d2948e4255c20e37 Mon Sep 17 00:00:00 2001 From: KTrain5369 <69028025+KTrain5169@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:29:37 +1000 Subject: [PATCH 4/4] support_onboard: fix fmt formatting issues --- src/handlers/event/support_onboard.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/handlers/event/support_onboard.rs b/src/handlers/event/support_onboard.rs index 6bc9197a..cb3b40fe 100644 --- a/src/handlers/event/support_onboard.rs +++ b/src/handlers/event/support_onboard.rs @@ -23,12 +23,12 @@ pub async fn handle(ctx: &Context, thread: &GuildChannel) -> Result<()> { .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" + .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"); return Ok(());