disnake
disnake copied to clipboard
`AttributeError`'s on `discord.Message` instantiation due to `Intents.none()`
Summary
When using Intents.none(), disnake.Message.thread will fail to resolve on un-cached guilds resulting in errors.
Reproduction Steps
I do not have the full reproduction steps, I fixed this awhile back but forgot to make an issue upstream. However, the description following this should provide enough reason to believe me.
Minimal Reproducible Code
Unsure if this works, however this is the rough idea.
# Pop your guild from the state cache
message = await channel.fetch_message(message with thread)
When attempting to build a message instance, Message.thread is called internally. Specifically here
Expected Results
The message object would be fetched/instantiated correctly.
Actual Results
AttributeError: 'Object' object has no attribute 'get_thread'
Intents
Intents.none()
System Information
Still applicable on master.
Checklist
- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
Additional Context
This code fixes the issue while keeping the end API the same.
Modify disnake.Message.thread to be this