diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 1f00368df..f8bb5c63a 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -46,7 +46,7 @@ from ..asset import Asset from ..partial_emoji import PartialEmoji from ..http import Route, handle_message_parameters, MultipartParameters, HTTPClient from ..mixins import Hashable -from ..channel import PartialMessageable +from ..channel import TextChannel, PartialMessageable from ..file import File __all__ = ( @@ -69,7 +69,7 @@ if TYPE_CHECKING: from ..http import Response from ..guild import Guild from ..emoji import Emoji - from ..channel import TextChannel + from ..channel import VoiceChannel from ..abc import Snowflake from ..ui.view import View import datetime @@ -932,8 +932,8 @@ class BaseWebhook(Hashable): return self._state and self._state._get_guild(self.guild_id) @property - def channel(self) -> Optional[TextChannel]: - """Optional[:class:`TextChannel`]: The text channel this webhook belongs to. + def channel(self) -> Optional[Union[VoiceChannel, TextChannel]]: + """Optional[Union[:class:`VoiceChannel`, :class:`TextChannel`]]: The channel this webhook belongs to. If this is a partial webhook, then this will always return ``None``. """