-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
unconfirmed bugA bug report that needs triagingA bug report that needs triaging
Description
Summary
calling is_nsfw() on a thread always returns False, even if the parent channel allows NSFW
Reproduction Steps
When accessing the thread through the interaction.channel object, interaction.channel.is_nsfw() always returns False, even if the parent channel has the nsfw flag. Additionally, interaction.channel.parent is None, where I'd expect the parent channel.
Minimal Reproducible Code
channel = interaction.channel.parent or interaction.channel
logger.info(f"Channel: {channel}")
logger.info(f"Thread Parent: {interaction.channel.parent}")
nsfw_allowed = channel.is_nsfw() if hasattr(channel, 'is_nsfw') else False
logger.info(f"NSFW allowed: {nsfw_allowed}")
# returns True for an nsfw channel, but False for a thread in that channelExpected Results
interaction.channel.is_nsfw() should return True if called from a thread inside an NSFW channel
Actual Results
interaction.channel.is_nsfw() returns False if called from a thread inside an NSFW channel
Intents
message_content
System Information
- Python v3.13.3-final
- discord.py v2.5.2-final
- aiohttp v3.12.15
- system info: Linux 6.14.0-23-generic Role.is_everyone() is broken #23-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 23:02:20 UTC 2025
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
Additional Context
No response
Metadata
Metadata
Assignees
Labels
unconfirmed bugA bug report that needs triagingA bug report that needs triaging