diff options
| author | Rapptz <[email protected]> | 2016-04-14 20:38:13 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2016-04-14 20:38:13 -0400 |
| commit | 03862a71453c1e8c8d5fed18dc87ddd3ad04d16f (patch) | |
| tree | 845e14760fe0d37a2edad404b738646e47b54e16 | |
| parent | Retry if send_message or edit_message encounter a 502. (diff) | |
| download | discord.py-03862a71453c1e8c8d5fed18dc87ddd3ad04d16f.tar.xz discord.py-03862a71453c1e8c8d5fed18dc87ddd3ad04d16f.zip | |
Add a None check when setting status in Client.change_status.
| -rw-r--r-- | discord/client.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/discord/client.py b/discord/client.py index e8987baa..c359509a 100644 --- a/discord/client.py +++ b/discord/client.py @@ -1587,9 +1587,13 @@ class Client: log.debug('Sending "{}" to change status'.format(sent)) yield from self._send_ws(sent) for server in self.servers: - server.me.game = game + me = server.me + if me is None: + continue + + me.game = game status = Status.idle if idle_since else Status.online - server.me.status = status + me.status = status # Channel management |