Skip to content
Open
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
18 changes: 12 additions & 6 deletions techsupport_bot/commands/factoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,12 +831,18 @@ async def response(
if factoid.disabled:
return

if (
factoid.restricted
and str(ctx.channel.id)
not in config.extensions.factoids.restricted_list.value
):
return
if factoid.restricted:
channel = ctx.channel
restricted_list = config.extensions.factoids.restricted_list.value
if isinstance(channel, discord.Thread):
if (
str(channel.id) not in restricted_list
and str(channel.parent.id) not in restricted_list
):
return
else:
if str(channel.id) not in restricted_list:
return

if config.extensions.factoids.disable_embeds.value:
embed = None
Expand Down
Loading