_accent_colour in discord.User was typehinted as a Optional[str] when it's stated to be an Optional[int] (or, well ?integer) by the Discord API docs and is treated by the library as an Optional[int] when User.accent_colour is called. This PR is a quick change to fix that (and make Pylance happy).
Checklist
If code changes were made then they have been tested.
I have updated the documentation to reflect the changes.
This PR fixes an issue.
This PR adds something new (e.g. new method or parameters).
This PR is a breaking change (e.g. methods or parameters removed/renamed)
This PR is not a code change (e.g. documentation, README, ...)
## Summary
`_accent_colour` in `discord.User` was typehinted as a `Optional[str]` when it's stated to be an `Optional[int]` (or, well `?integer`) by the [Discord API docs](https://discord.com/developers/docs/resources/user#user-object-user-structure) and is treated by the library as an `Optional[int]` when `User.accent_colour` is called. This PR is a quick change to fix that (and make Pylance happy).
## Checklist
<!-- Put an x inside [ ] to check it, like so: [x] -->
- [x] If code changes were made then they have been tested.
- [ ] I have updated the documentation to reflect the changes.
- [ ] This PR fixes an issue.
- [ ] This PR adds something new (e.g. new method or parameters).
- [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [ ] This PR is **not** a code change (e.g. documentation, README, ...)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
_accent_colourindiscord.Userwas typehinted as aOptional[str]when it's stated to be anOptional[int](or, well?integer) by the Discord API docs and is treated by the library as anOptional[int]whenUser.accent_colouris called. This PR is a quick change to fix that (and make Pylance happy).Checklist
Looks good, checked at runtime and it is indeed
int.