Fix typing issues and improve typing completeness across the library

Co-authored-by: Danny <Rapptz@users.noreply.github.com>
Co-authored-by: Josh <josh.ja.butt@gmail.com>
This commit is contained in:
Stocker
2022-03-13 23:52:10 -04:00
committed by GitHub
parent 603681940f
commit 5aa696ccfa
66 changed files with 1071 additions and 802 deletions

View File

@@ -123,6 +123,7 @@ if TYPE_CHECKING:
)
from .types.integration import IntegrationType
from .types.snowflake import SnowflakeList
from .types.widget import EditWidgetSettings
VocalGuildChannel = Union[VoiceChannel, StageChannel]
GuildChannel = Union[VocalGuildChannel, TextChannel, CategoryChannel, StoreChannel]
@@ -3379,7 +3380,7 @@ class Guild(Hashable):
HTTPException
Editing the widget failed.
"""
payload = {}
payload: EditWidgetSettings = {}
if channel is not MISSING:
payload['channel_id'] = None if channel is None else channel.id
if enabled is not MISSING:
@@ -3492,7 +3493,7 @@ class Guild(Hashable):
async def change_voice_state(
self, *, channel: Optional[abc.Snowflake], self_mute: bool = False, self_deaf: bool = False
):
) -> None:
"""|coro|
Changes client's voice state in the guild.