Relationship Manager
Variables
relationship
Type: Dictionary
Key | Type | Description |
---|---|---|
"type" | String | The type of relationship the current user has with the given user. These are:"None" user has no intrinsic relationship"Friend" user is a friend"Blocked" user is blocked"PendingIncoming" user has a pending incoming friend request to connected user"PendingOutgoing" current user has a pending outgoing friend request to user"Implicit" user is not friends, but interacts with current user often (frequency + recency)"NotAvailable" relationship is unknown |
"user" | Dictionary | user |
"presence" | Dictionary | Will be described below. |
presence
Type: Dictionary
Name | Type | Description |
---|---|---|
"status" | String | The user status:"Offline" "Online" "Idle" "DoNotDisturb" "NotAvailable" |
"activity" | Dictionary | All activity values and the "name" of the activity |
Signals
Relationship init
Connect it with:
Add it in your gdscript as function:
The Signal fires when Discord is ready to offer relationship information.
Updated relationship
Connect it with:
Add it in your gdscript as function:
The Signal fires when a user in the Relationships list of the current user updated any user information.
For example activity details update, avatar update, username update, online, offline etc…
Given variable: Dictionary relationship
Methods
Get relationship
Returns the relationship between the current user and the user_id
Taken variable: int user_id
Given variable: Dictionary relationship
Get all relationships
Returns all relationships the current user has. Warning: this will be many! (if not I’m sorry xD)
Given variable: Dictionary relationship