-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parentId
should never be null on PublicThreadChannel
#8471
Comments
|
That's my misconception, but that makes this even weirder, because
If that was the case, that would be great. |
ah.....right, the minor detail of interactions.
So, to get the parent, try |
I don't know much about partials so I have no comments there. But I'm sorry, I don't really understand why |
parent
should never be null on PublicThreadChannel
parentId
should never be null on PublicThreadChannel
Also, re:
I have sweepers setup for threads, don't know if that would affect this. Probably? |
Again, all threads behave exactly the same in regards to Sweepers don't affect the types, but it can be part of a situation where As for partials, discord sometimes doesn't send full objects, to save network bandwidth for things that most people won't need. In the past, the resolved data for a slash commadn channel option didn't contain |
Perhaps add |
Which package is this bug report for?
discord.js
Issue description
How it should be
A
PublicThreadChannel
(ThreadChannel.type: ChannelType.GuildPublicThread | ChannelType.GuildNewsThread
) should never haveparentId === null
.How it is in DJS
PublicThreadChannel.parentId
andPublicThreadChannel.parent
can both be null.The problem
It is not possible (to my knowledge) to safely get the parent channel of a
PublicThreadChannel
. There is nofetchParent()
. And we cannot use<client>.channels.fetch(<thread>.parentId)
becauseparentId
can be null. How are we supposed to get the parent channel of a public thread?Possibly related
#8466
Code sample
Package version
discord.js@14.1.1
Node.js version
v16.13.2
Operating system
Windows
Priority this issue should have
Medium (should be fixed soon)
Which partials do you have configured?
No Partials
Which gateway intents are you subscribing to?
Guilds, GuildMessages
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: