diff options
| author | Rapptz <[email protected]> | 2018-07-20 04:15:58 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-07-20 04:15:58 -0400 |
| commit | 351bb1927a911476200ae1c28c9722020533d5ab (patch) | |
| tree | aec24e506d90c7767e95fb536d70930cf063ee15 | |
| parent | Revert "Ensure gif avatar urls end in `.gif`" (diff) | |
| download | discord.py-351bb1927a911476200ae1c28c9722020533d5ab.tar.xz discord.py-351bb1927a911476200ae1c28c9722020533d5ab.zip | |
Fix crashing with wonky TYPING_START events.
Fixes #1439
| -rw-r--r-- | discord/state.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py index df364296..22978e93 100644 --- a/discord/state.py +++ b/discord/state.py @@ -819,7 +819,7 @@ class ConnectionState: user_id = utils._get_as_snowflake(data, 'user_id') if isinstance(channel, DMChannel): member = channel.recipient - elif isinstance(channel, TextChannel): + elif isinstance(channel, TextChannel) and guild is not None: member = guild.get_member(user_id) elif isinstance(channel, GroupChannel): member = utils.find(lambda x: x.id == user_id, channel.recipients) |