Skip to content

Commit

Permalink
Fix double-close resolved threads (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcarl authored Dec 28, 2023
1 parent 09b4cc1 commit 354a7be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/features/autothread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const autoThread: ChannelHandlers = {
if (!thread.isThread() || !starter || !guild) {
return;
}
// Bail out early if the thread is already resolved
if (CHECKS.some((c) => thread.name.includes(c))) {
return;
}

const reactors = await fetchReactionMembers(guild, reaction);
const roledReactors = reactors.filter((r) => isStaff(r) || isHelpful(r));
Expand Down

0 comments on commit 354a7be

Please sign in to comment.