mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 00:13:01 +00:00
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:
@@ -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.
|
||||
|
Reference in New Issue
Block a user