Skip to content

Commit

Permalink
Allow people to send metadata with activity and fix a bug (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStretchd authored Jan 13, 2024
1 parent 26162e1 commit 763eb2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion discord/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ class Activity(BaseActivity):
'application_id',
'emoji',
'buttons',
'metadata'
)

def __init__(self, **kwargs: Any) -> None:
Expand All @@ -226,7 +227,8 @@ def __init__(self, **kwargs: Any) -> None:
self.flags: int = kwargs.pop('flags', 0)
self.sync_id: Optional[str] = kwargs.pop('sync_id', None)
self.session_id: Optional[str] = kwargs.pop('session_id', None)
self.buttons: List[str] = kwargs.pop('buttons', [])
self.buttons: Optional[List[str]] = kwargs.pop('buttons', None)
self.metadata: Optional[dict] = kwargs.pop('metadata', None)

activity_type = kwargs.pop('type', -1)
self.type: ActivityType = (
Expand Down

0 comments on commit 763eb2e

Please sign in to comment.