Refactor Guild to support type hints

This patch also does the following:

* Sets some parameters to be positional only
* Changes Guild.edit to use the MISSING sentinel
* Changes the various create_channel methods to be type safe
* Changes many parameters from Optional[T] to use MISSING
* Changes Guild.create_role to use MISSING sentinel

This refactor is mostly partial but lays a decent foundation
This commit is contained in:
Rapptz
2021-06-08 10:54:22 -04:00
parent 2247fbb23a
commit 7dccbace78
3 changed files with 552 additions and 388 deletions

View File

@ -44,6 +44,7 @@ from .mentions import AllowedMentions
from .partial_emoji import PartialEmoji
from .message import Message
from .channel import *
from .channel import _channel_factory
from .raw_models import *
from .member import Member
from .role import Role