Update docs for the UpdatePlayer event
This commit is contained in:
parent
3c043862e8
commit
7b4c39b740
1 changed files with 13 additions and 1 deletions
|
|
@ -6,11 +6,23 @@ This event is sent as a result of a player joining/changing team, this event is
|
|||
## Request Payload:
|
||||
| Property | Type | Description
|
||||
| -------- | ---- | -----------
|
||||
| action | String | The action to take on the player. This can be one of `"modify"`, or `"remove"`, any other value will throw an error.
|
||||
| name | String | The player's name
|
||||
| to | PlayerData | The player's new data.
|
||||
| from | PlayerData | The player's old data.
|
||||
|
||||
|
||||
### `PlayerData`:
|
||||
The below table describes the properties for the player data object.
|
||||
| Property | Type | Description
|
||||
| -------- | ---- | -----------
|
||||
| team | Integer | The team to join. Accepted values are: `1`, and `2`, any other value will throw an error.
|
||||
| role | String | The role the player is assuming. This can be `"writer"` or `"guesser"`, any other value will throw an error.
|
||||
|
||||
## Response Payload:
|
||||
| Property | Type | Description
|
||||
| -------- | ---- | -----------
|
||||
| player | Player | The player's new data.
|
||||
| action | String | The action that we are responding, this can be one of `"new"`, `"modify"`, or `"remove"`.
|
||||
| name | String | The name of the player that is being updated.
|
||||
| role | String | The role the user is becoming. This can be `"writer"`, or `"guesser"`, and will only be set if the `action` is set to `modify`.
|
||||
| team | String | The team that the user is joining. This can be `1`, or `2`, and will only be set if the `action` is set to `modify`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue