Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit 2db8c06

Browse files
committed
Fix sending arrays with nulls in them when changing presences
1 parent c896563 commit 2db8c06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/gateway.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,15 +599,15 @@ async def change_presence(self, *, activity=None, status=None, afk=False, since=
599599
if activity is not None:
600600
if not isinstance(activity, BaseActivity):
601601
raise InvalidArgument('activity must derive from BaseActivity.')
602-
activity = activity.to_dict()
602+
activity = [activity.to_dict()]
603603

604604
if status == 'idle':
605605
since = int(time.time() * 1000)
606606

607607
payload = {
608608
'op': self.PRESENCE,
609609
'd': {
610-
'activities': [activity],
610+
'activities': activity,
611611
'afk': afk,
612612
'since': since,
613613
'status': status

0 commit comments

Comments
 (0)