You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-tools/embedded-app-sdk.mdx
+74-1Lines changed: 74 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -167,6 +167,7 @@ Developers can use these commands to interact with the Discord client. The follo
167
167
|[getEntitlements](/docs/developer-tools/embedded-app-sdk#getentitlements)| Returns a list of entitlements for the current user |
168
168
|[getInstanceConnectedParticipants](/docs/developer-tools/embedded-app-sdk#getinstanceconnectedparticipants)| Returns all participants connected to the instance |
169
169
|[getPlatformBehaviors](/docs/developer-tools/embedded-app-sdk#getplatformbehaviors)| Returns information about supported platform behaviors |
170
+
|[getRelationships](/docs/developer-tools/embedded-app-sdk#getrelationships)| Returns the current user's relationships |
170
171
|[getSkus](/docs/developer-tools/embedded-app-sdk#getskus)| Returns a list of your app's SKUs |
171
172
|[initiateImageUpload](/docs/developer-tools/embedded-app-sdk#initiateimageupload)| Presents the file upload flow in the Discord client |
172
173
|[openExternalLink](/docs/developer-tools/embedded-app-sdk#openexternallink)| Allows for opening an external link from within the Discord client |
Returns a list of SKU objects. SKUs without prices are automatically filtered out.
@@ -795,9 +825,9 @@ Developers may use the following events alongside the `subscribe()` SDK method t
795
825
|[CURRENT_GUILD_MEMBER_UPDATE](/docs/developer-tools/embedded-app-sdk#currentguildmemberupdate)| Received when the current guild member object changes |
796
826
|[THERMAL_STATE_UPDATE](/docs/developer-tools/embedded-app-sdk#thermalstateupdate)| Received when Android or iOS thermal states are surfaced to the Discord app |
797
827
|[ACTIVITY_INSTANCE_PARTICIPANTS_UPDATE](/docs/developer-tools/embedded-app-sdk#activityinstanceparticipantsupdate)| Received when the number of instance participants changes |
828
+
|[RELATIONSHIP_UPDATE](/docs/developer-tools/embedded-app-sdk#relationshipupdate)| Received when a relationship of the current user is updated |
798
829
|[ENTITLEMENT_CREATE](/docs/developer-tools/embedded-app-sdk#entitlementcreate)| Received when an entitlement is created for a SKU |
799
830
800
-
801
831
### READY
802
832
803
833
Non-subscription event sent immediately after connecting, contains server information.
@@ -1051,6 +1081,36 @@ No scopes required
1051
1081
]
1052
1082
}
1053
1083
```
1084
+
---
1085
+
1086
+
### RELATIONSHIP_UPDATE
1087
+
1088
+
Received when a relationship of the current user is updated.
1089
+
1090
+
#### Required Scopes
1091
+
1092
+
- relationships.read
1093
+
1094
+
#### Sample Event Payload
1095
+
```javascript
1096
+
{
1097
+
"type":1,
1098
+
"user": {
1099
+
"id":"7173771622812225536",
1100
+
"username":"beef_supreme",
1101
+
"discriminator":"0",
1102
+
"global_name":"Dis Cord",
1103
+
"avatar":"abcdefg",
1104
+
"avatar_decoration_data": {
1105
+
"asset":"abcdefg",
1106
+
"sku_id":"123456789"
1107
+
},
1108
+
"bot":false,
1109
+
"flags":1,
1110
+
"premium_type":2
1111
+
}
1112
+
}
1113
+
```
1054
1114
1055
1115
---
1056
1116
@@ -1302,6 +1362,12 @@ Coming soon! Not available during Developer Preview
0 commit comments