diff options
| author | Rapptz <[email protected]> | 2018-02-24 17:37:37 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2018-02-24 17:37:37 -0500 |
| commit | 1c215cfbbe8954add843512924e71925122b6a99 (patch) | |
| tree | d61d8bb9ec51cc3c7fbe527a6b1f73e6ab7701f2 | |
| parent | Add seek_begin keyword argument to Attachment.save (diff) | |
| download | discord.py-1c215cfbbe8954add843512924e71925122b6a99.tar.xz discord.py-1c215cfbbe8954add843512924e71925122b6a99.zip | |
Don't cache webhook users.
Fixes #1101
| -rw-r--r-- | discord/state.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/discord/state.py b/discord/state.py index 470c4eeb..d9a53886 100644 --- a/discord/state.py +++ b/discord/state.py @@ -151,7 +151,9 @@ class ConnectionState: try: return self._users[user_id] except KeyError: - self._users[user_id] = user = User(state=self, data=data) + user = User(state=self, data=data) + if user.discriminator != '0000': + self._users[user_id] = user return user def get_user(self, id): |