Fix webhook_update from code review
This commit is contained in:
parent
17f9916b03
commit
d092c6635b
@ -780,8 +780,9 @@ class ConnectionState:
|
||||
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)
|
||||
channel = self.get_channel(int(data['channel_id']))
|
||||
if channel:
|
||||
self.dispatch('webhooks_update', channel)
|
||||
|
||||
def parse_voice_state_update(self, data):
|
||||
guild = self._get_guild(utils._get_as_snowflake(data, 'guild_id'))
|
||||
|
@ -384,7 +384,7 @@ to handle it, which defaults to print a traceback and ignoring the exception.
|
||||
|
||||
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.
|
||||
:param channel: The :class:`abc.GuildChannel` that had its webhooks updated.
|
||||
|
||||
.. function:: on_member_join(member)
|
||||
on_member_remove(member)
|
||||
|
Loading…
x
Reference in New Issue
Block a user