mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +00:00
Simple parser for WEBHOOKS_UPDATE
This commit is contained in:
parent
51a03d96e0
commit
17f9916b03
@ -779,6 +779,10 @@ class ConnectionState:
|
||||
log.info('Processed a chunk for %s members in guild ID %s.', len(members), guild_id)
|
||||
self.process_listeners(ListenerType.chunk, guild, len(members))
|
||||
|
||||
def parse_webhooks_update(self, data):
|
||||
channel = self.get_channel(int(data["channel_id"]))
|
||||
self.dispatch("webhooks_update", channel)
|
||||
|
||||
def parse_voice_state_update(self, data):
|
||||
guild = self._get_guild(utils._get_as_snowflake(data, 'guild_id'))
|
||||
channel_id = utils._get_as_snowflake(data, 'channel_id')
|
||||
|
@ -380,6 +380,12 @@ to handle it, which defaults to print a traceback and ignoring the exception.
|
||||
:param last_pin: A ``datetime.datetime`` object representing when the latest message
|
||||
was pinned or ``None`` if there are no pins.
|
||||
|
||||
.. function:: on_webhooks_update(channel)
|
||||
|
||||
Called whenever a webhook is created, modified, or removed from a guild channel.
|
||||
|
||||
:param channel: The :class:`abc.GuildChannel` that had it's webhooks updated.
|
||||
|
||||
.. function:: on_member_join(member)
|
||||
on_member_remove(member)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user