mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Add ForumChannel to Webhook's documentation
This commit is contained in:
parent
95b6bd8782
commit
c6decedf7b
@ -68,7 +68,7 @@ if TYPE_CHECKING:
|
|||||||
from ..http import Response
|
from ..http import Response
|
||||||
from ..guild import Guild
|
from ..guild import Guild
|
||||||
from ..emoji import Emoji
|
from ..emoji import Emoji
|
||||||
from ..channel import VoiceChannel
|
from ..channel import ForumChannel, VoiceChannel
|
||||||
from ..abc import Snowflake
|
from ..abc import Snowflake
|
||||||
from ..ui.view import View
|
from ..ui.view import View
|
||||||
import datetime
|
import datetime
|
||||||
@ -1006,8 +1006,8 @@ class BaseWebhook(Hashable):
|
|||||||
return self._state and self._state._get_guild(self.guild_id)
|
return self._state and self._state._get_guild(self.guild_id)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def channel(self) -> Optional[Union[VoiceChannel, TextChannel]]:
|
def channel(self) -> Optional[Union[ForumChannel, VoiceChannel, TextChannel]]:
|
||||||
"""Optional[Union[:class:`VoiceChannel`, :class:`TextChannel`]]: The channel this webhook belongs to.
|
"""Optional[Union[:class:`ForumChannel`, :class:`VoiceChannel`, :class:`TextChannel`]]: The channel this webhook belongs to.
|
||||||
|
|
||||||
If this is a partial webhook, then this will always return ``None``.
|
If this is a partial webhook, then this will always return ``None``.
|
||||||
"""
|
"""
|
||||||
@ -1059,7 +1059,8 @@ class Webhook(BaseWebhook):
|
|||||||
|
|
||||||
There are two main ways to use Webhooks. The first is through the ones
|
There are two main ways to use Webhooks. The first is through the ones
|
||||||
received by the library such as :meth:`.Guild.webhooks`,
|
received by the library such as :meth:`.Guild.webhooks`,
|
||||||
:meth:`.TextChannel.webhooks` and :meth:`.VoiceChannel.webhooks`.
|
:meth:`.TextChannel.webhooks`, :meth:`.VoiceChannel.webhooks`
|
||||||
|
and :meth:`.ForumChannel.webhooks`.
|
||||||
The ones received by the library will automatically be
|
The ones received by the library will automatically be
|
||||||
bound using the library's internal HTTP session.
|
bound using the library's internal HTTP session.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user