Skip to content

Commit

Permalink
Fix KeyError caused by looking up thread IDs in 'showcase_channels_co…
Browse files Browse the repository at this point in the history
…nfig' in 'showcase' extension
  • Loading branch information
Mega-JC committed Jul 29, 2024
1 parent b09efa7 commit f19cfd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pcbot/exts/showcase/cogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,13 @@ def showcase_message_validity_check(
"""
return validate_message(
message,
self.showcase_channels_config[message.channel.id]["showcase_message_rules"],
self.showcase_channels_config[
(
message.channel.parent_id
if isinstance(message.channel, discord.Thread)
else message.channel.id
)
]["showcase_message_rules"],
)

@commands.Cog.listener()
Expand Down

0 comments on commit f19cfd3

Please sign in to comment.