mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
Update Webhook.channel typing to include VoiceChannel as well
This commit is contained in:
parent
c284145f18
commit
538ba0d076
@ -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``.
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user