diff options
| author | Ian Salmons <[email protected]> | 2017-01-09 01:07:28 +0000 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-01-09 03:52:44 -0500 |
| commit | c635ce25269e86fe8fd05d1d1785a148293896b4 (patch) | |
| tree | 0640575de14a714fced9ac4ae8a42e41d1ee93aa /discord/state.py | |
| parent | Use CDN URL for Guild.icon_url. (diff) | |
| download | discord.py-c635ce25269e86fe8fd05d1d1785a148293896b4.tar.xz discord.py-c635ce25269e86fe8fd05d1d1785a148293896b4.zip | |
Simple parser for CHANNEL_PINS_UPDATE
Diffstat (limited to 'discord/state.py')
| -rw-r--r-- | discord/state.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/state.py b/discord/state.py index 543e8a63..37ccd922 100644 --- a/discord/state.py +++ b/discord/state.py @@ -390,6 +390,11 @@ class ConnectionState: self.dispatch('channel_create', channel) + def parse_channel_pins_update(self, data): + channel = self.get_channel(int(data['channel_id'])) + last_pin = utils.parse_time(data['last_pin_timestamp']) if data['last_pin_timestamp'] else None + self.dispatch('channel_pins_update', channel, last_pin) + def parse_channel_recipient_add(self, data): channel = self._get_private_channel(int(data['channel_id'])) user = self.store_user(data['user']) |