-
-
Notifications
You must be signed in to change notification settings - Fork 465
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
Resolve issues with discord.Thread
and discord.ThreadOption
when used in discord.Option
#1427
Conversation
This PR may not be necessary since ThreadOption exists, however, there does appear to be an issue with ThreadOption and I may convert this PR into resolving that since it is closely related. |
I've decided to patch the issue with ThreadOption but keep the changes in this PR as they will allow for discord.Thread to be used directly as an input type now, avoiding confusion. This does make ThreadOption effectively useless, but removing it would be considered a breaking change and I think we're too close to 2.0.0 full release to have breaking changes now. |
discord.Thread
not working as discord.Option
input typediscord.Thread
and discord.ThreadOption
when used in discord.Option
Summary
This PR resolves issues when using
discord.Thread
as adiscord.Option
input type. Previously, doing so raised an error:TypeError: 'NoneType' object is not callable
. Now, threads are correctly handled when given as an option type. A few touchups to changes made in #1365 are also made here including comment updates and updates to how the_invoke_flag
key works when being added to data. Atop of this,discord.ThreadOption
now has documentation with this PR.Checklist
type: ignore
comments were used, a comment is also left explaining why