Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Changes since 2026.06.04
- The /factoid call command now has an optional parameter to ping a member in the factoid display
- Factoids called using /factoid call will now have a button to allow the invoker to delete the factoid
- A new /factoid add command has been added, using a modal to create new factoids
- Fix restricted factoids not working in threads

### Forum
- This changes the way the first message in a forum channel is obtained for initial post rejection detection
Expand Down
17 changes: 11 additions & 6 deletions modules/operation/factoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,12 +814,17 @@ async def response(
if factoid.disabled:
return

if factoid.restricted and str(
ctx.channel.id
) not in configuration.get_config_entry(
ctx.guild.id, "factoids_restricted_list"
):
return
if factoid.restricted:
channel = ctx.channel
restricted_list = configuration.get_config_entry(
ctx.guild.id, "factoids_restricted_list"
)
if isinstance(channel, discord.Thread):
if str(channel.parent.id) not in restricted_list:
return
else:
if str(channel.id) not in restricted_list:
return

if configuration.get_config_entry(ctx.guild.id, "factoids_disable_embeds"):
embed = None
Expand Down
Loading