Closed PrivateGER closed 3 years ago
Fetching the channel manually using client.channels.fetch(message.channel.id)
returns a channel with a properly set nsfw property.
yes, Discord only sends channel IDs in the message payload, therefore message.channel is a partial if caching is disabled
Thank you, noted. You maybe should mention that specifically in the readme, since it's an unexpected breaking change.
Also, in case you're interested in adding my bot to the README list: Here it is.
It is mentioned in the readme:
Structures not marked as partial only guarantee the contents of its top-level properties. Linked structures such as message.channel or reaction.message may still be partials if not previously cached or fetched.
Feel free to make a PR to add your bot or if you dont mind waiting, i can look into it later today
Added your bot but had to put it in the bottom of the list because it doesnt have a badge yet. let me know if you ever get a badge thingy
Yeah, that's sadly not going to happen, top.gg is extremely hostile towards NSFW bots for some reason. :/ Maybe I'll make my own badge image some day.
The library seems to return an incorrect NSFW status for text channels in message objects when channel caching is disabled. Despite the channel being NSFW, the property always is false.