bryanforbes / discord.py-stubs

discord.py stubs
BSD 3-Clause "New" or "Revised" License
46 stars 12 forks source link

Guild.me is typed as an optional, while it is not in the doc #51

Closed Shaac closed 3 years ago

Shaac commented 3 years ago

Hello, Thanks for this project!

I noticed that Guild.me was typed as a Optional[Member], but it is not how it is documented in the discord.py documentation.

https://github.com/bryanforbes/discord.py-stubs/blob/eb3e8afe9dd171f4da37df712a9a96a6a17e1643/discord-stubs/guild.pyi#L101

Unless it is an error in discord.py documentation, the Optional should probably be dropped here.

Thanks!

bryanforbes commented 3 years ago

I based the typing of Guild.me on the code, which calls Guild.get_member() and that returns Optional[Member]. I'll do some digging and see if that can be changed.

bryanforbes commented 3 years ago

I verified with someone in the Discord server and have updated the typing. I'll make a new release later today.

bryanforbes commented 3 years ago

Version 1.6.0.1 (which includes this fix) has been released on pypi