diff options
| author | Rapptz <[email protected]> | 2015-11-30 17:55:25 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-11-30 17:55:25 -0500 |
| commit | 56a71e3166495254aafc11d0339bd55e0c408e3f (patch) | |
| tree | 13e1a58140e09507acde4edfc6b771e87eda1aad | |
| parent | Fix multiple CHANNEL_DELETE. Fixes #51. (diff) | |
| download | discord.py-56a71e3166495254aafc11d0339bd55e0c408e3f.tar.xz discord.py-56a71e3166495254aafc11d0339bd55e0c408e3f.zip | |
Don't silently swallow ValueError thrown from on_channel_delete.
| -rw-r--r-- | discord/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py index b2d27663..8e94971c 100644 --- a/discord/client.py +++ b/discord/client.py @@ -226,9 +226,10 @@ class ConnectionState(object): channel = utils.find(lambda c: c.id == channel_id, server.channels) try: server.channels.remove(channel) - self.dispatch('channel_delete', channel) except ValueError: return + else: + self.dispatch('channel_delete', channel) def handle_channel_update(self, data): server = self._get_server(data.get('guild_id')) |