|
@ -599,7 +599,9 @@ class DiscordWebSocket: |
|
|
if activity is not None: |
|
|
if activity is not None: |
|
|
if not isinstance(activity, BaseActivity): |
|
|
if not isinstance(activity, BaseActivity): |
|
|
raise InvalidArgument('activity must derive from BaseActivity.') |
|
|
raise InvalidArgument('activity must derive from BaseActivity.') |
|
|
activity = activity.to_dict() |
|
|
activity = [activity.to_dict()] |
|
|
|
|
|
else: |
|
|
|
|
|
activity = [] |
|
|
|
|
|
|
|
|
if status == 'idle': |
|
|
if status == 'idle': |
|
|
since = int(time.time() * 1000) |
|
|
since = int(time.time() * 1000) |
|
@ -607,7 +609,7 @@ class DiscordWebSocket: |
|
|
payload = { |
|
|
payload = { |
|
|
'op': self.PRESENCE, |
|
|
'op': self.PRESENCE, |
|
|
'd': { |
|
|
'd': { |
|
|
'activities': [activity], |
|
|
'activities': activity, |
|
|
'afk': afk, |
|
|
'afk': afk, |
|
|
'since': since, |
|
|
'since': since, |
|
|
'status': status |
|
|
'status': status |
|
|