Skip to content

Commit

Permalink
Fix bug causing help posts to not be scheduled for deletion in 'helpf…
Browse files Browse the repository at this point in the history
…orums_pre' extension
  • Loading branch information
Mega-JC committed Jul 20, 2024
1 parent 7299033 commit 9c3a224
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pcbot/exts/helpforums_pre/cogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ async def on_raw_message_delete(self, payload: discord.RawMessageDeleteEvent):
cached_message = payload.cached_message
if (
cached_message
and cached_message.channel.id not in HELP_FORUM_CHANNEL_IDS.values()
and isinstance(cached_message.channel, discord.Thread)
and cached_message.channel.parent_id not in HELP_FORUM_CHANNEL_IDS.values()
):
return

Expand Down Expand Up @@ -898,9 +899,7 @@ async def on_raw_reaction_add(self, payload: discord.RawReactionActionEvent):
+ (
"the OP"
if by_op
else "an admin"
if by_admin
else "a Helpfulie"
else "an admin" if by_admin else "a Helpfulie"
)
+ " (via adding a ✅ reaction).",
applied_tags=new_tags,
Expand Down Expand Up @@ -988,9 +987,7 @@ async def on_raw_reaction_remove(self, payload: discord.RawReactionActionEvent):
+ (
"the OP"
if by_op
else "an admin"
if by_admin
else "a Helpfulie"
else "an admin" if by_admin else "a Helpfulie"
)
+ " (via removing a ✅ reaction).",
)
Expand Down

0 comments on commit 9c3a224

Please sign in to comment.