Add support for editing and deleting webhook messages.

Fix #6058
This commit is contained in:
Rapptz
2020-12-09 20:15:35 -05:00
parent b00aaab0b2
commit 44dc7a8e02
4 changed files with 241 additions and 15 deletions

View File

@ -41,7 +41,6 @@ from .mixins import Hashable
from .user import User
from .invite import Invite
from .iterators import AuditLogIterator, MemberIterator
from .webhook import Webhook
from .widget import Widget
from .asset import Asset
from .flags import SystemChannelFlags
@ -482,7 +481,7 @@ class Guild(Hashable):
@property
def public_updates_channel(self):
"""Optional[:class:`TextChannel`]: Return's the guild's channel where admins and
moderators of the guilds receive notices from Discord. The guild must be a
moderators of the guilds receive notices from Discord. The guild must be a
Community guild.
If no channel is set, then this returns ``None``.
@ -1482,6 +1481,7 @@ class Guild(Hashable):
The webhooks for this guild.
"""
from .webhook import Webhook
data = await self._state.http.guild_webhooks(self.id)
return [Webhook.from_state(d, state=self._state) for d in data]