@@ -770,6 +770,10 @@ class Activity(BaseActivity):
770770 The activity flags.
771771 application_id: Optional[:class:`int`]
772772 The application ID of the game.
773+ parent_application_id: Optional[:class:`int`]
774+ The parent application ID of the game.
775+
776+ .. versionadded:: 2.1
773777 name: :class:`str`
774778 The name of the activity.
775779 url: Optional[:class:`str`]
@@ -824,6 +828,10 @@ class Activity(BaseActivity):
824828 The ID of the session this activity belongs to.
825829 application_id: Optional[:class:`int`]
826830 The application ID of the game.
831+ parent_application_id: Optional[:class:`int`]
832+ The parent application ID of the game.
833+
834+ .. versionadded:: 2.1
827835 name: :class:`str`
828836 The name of the activity.
829837 url: Optional[:class:`str`]
@@ -908,6 +916,7 @@ class Activity(BaseActivity):
908916 'name' ,
909917 'url' ,
910918 'application_id' ,
919+ 'parent_application_id' ,
911920 'emoji' ,
912921 'buttons' ,
913922 'secrets' ,
@@ -923,6 +932,7 @@ def __init__(
923932 type : ActivityType = ActivityType .playing ,
924933 flags : Optional [ActivityFlags ] = None ,
925934 application_id : Optional [int ] = None ,
935+ parent_application_id : Optional [int ] = None ,
926936 name : str ,
927937 url : Optional [str ] = None ,
928938 state : Optional [str ] = None ,
@@ -947,6 +957,7 @@ def __init__(
947957 self ._user_id : Optional [int ] = None
948958 self ._flags : int = flags .value if flags is not None else 0
949959 self .application_id : Optional [int ] = application_id
960+ self .parent_application_id : Optional [int ] = parent_application_id
950961 self .url = url
951962 self .state : Optional [str ] = state
952963 self .state_url = state_url
@@ -1024,6 +1035,7 @@ def from_dict(cls, data: ActivityPayload, *, state: ConnectionState, user_id: Op
10241035 self ._created_at = data .get ('created_at' )
10251036 self ._flags = data .get ('flags' , 0 )
10261037 self .application_id = _get_as_snowflake (data , 'application_id' )
1038+ self .parent_application_id = _get_as_snowflake (data , 'parent_application_id' )
10271039 self .url = data .get ('url' )
10281040 self .state = data .get ('state' )
10291041 self .state_url = data .get ('state_url' )
@@ -1149,6 +1161,8 @@ def to_dict(self) -> ActivityPayload:
11491161 ret ['flags' ] = self ._flags
11501162 if self .application_id :
11511163 ret ['application_id' ] = self .application_id
1164+ if self .parent_application_id :
1165+ ret ['parent_application_id' ] = self .parent_application_id
11521166 if self .url :
11531167 ret ['url' ] = self .url
11541168 if self .state :
0 commit comments