mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-22 00:13:01 +00:00
Add AutoShardedClient.change_presence.
This commit is contained in:
@@ -1006,13 +1006,24 @@ class Client:
|
||||
|
||||
if status is None:
|
||||
status = 'online'
|
||||
status_enum = Status.online
|
||||
elif status is Status.offline:
|
||||
status = 'invisible'
|
||||
status_enum = Status.offline
|
||||
else:
|
||||
status_enum = status
|
||||
status = str(status)
|
||||
|
||||
yield from self.ws.change_presence(game=game, status=status, afk=afk)
|
||||
|
||||
for guild in self.connection.guilds:
|
||||
me = guild.me
|
||||
if me is None:
|
||||
continue
|
||||
|
||||
me.game = game
|
||||
me.status = status_enum
|
||||
|
||||
# Invite management
|
||||
|
||||
def _fill_invite_data(self, data):
|
||||
|
Reference in New Issue
Block a user