Browse Source

Fix regression with Member.activities not clearing

pull/2634/head
Rapptz 5 years ago
parent
commit
6c764465c0
  1. 3
      discord/client.py
  2. 4
      discord/shard.py

3
discord/client.py

@ -949,6 +949,9 @@ class Client:
if activity is not None:
me.activities = (activity,)
else:
me.activities = ()
me.status = status_enum
# Guild stuff

4
discord/shard.py

@ -348,11 +348,11 @@ class AutoShardedClient(Client):
await shard.ws.change_presence(activity=activity, status=status, afk=afk)
guilds = [g for g in self._connection.guilds if g.shard_id == shard_id]
activities = () if activity is None else (activity,)
for guild in guilds:
me = guild.me
if me is None:
continue
if activity is not None:
me.activities = (activity,)
me.activities = activities
me.status = status_enum

Loading…
Cancel
Save