Duvet DOCS
GitHub

User Events

USER_UPDATE

EVENT USER_UPDATE

Sent when a user updates their profile. Broadcast to all spaces the user is a member of.

FieldTypeDescription
id stringUser ID
username stringUpdated username
alias string?Updated display name
avatar string?Updated avatar attachment ID
banner string?Updated banner attachment ID
flags integerUser flags bitfield
badges integerUser badges bitfield
{
  "type": "USER_UPDATE",
  "data": {
    "id": "019cf96a-3d5b-72c5-830f-75e85355d078",
    "username": "MARCROCK22",
    "alias": null,
    "avatar": "9bd6da82-c850-424b-89a0-9e4733263a45",
    "banner": null,
    "flags": 1,
    "badges": 1
  }
}

USER_STATUS_UPDATE

EVENT USER_STATUS_UPDATE

Sent when a user's online status changes. For regular users, broadcast to all spaces. For sharded bots, broadcast only to the specific space affected by the shard connect/disconnect.

FieldTypeDescription
user_id stringUser ID
space_id ?stringSpace ID (present for sharded bot per-space status updates, absent for global user status)
status_id integer0 = offline, 1 = online

Status only has two values: 0 (offline) and 1 (online). The type is uint8.

For sharded bots, status is per-space: if shard 0 disconnects, only spaces assigned to shard 0 receive an offline update. The space_id field is present in these per-space updates.

{
  "type": "USER_STATUS_UPDATE",
  "data": {
    "user_id": "019cf96a-3d5b-72c5-830f-75e85355d078",
    "status_id": 1
  }
}

USER_ACTIVITY_UPDATE

EVENT USER_ACTIVITY_UPDATE

Sent when a user's rich presence activity changes. Broadcast to all spaces the user is a member of.

FieldTypeDescription
user_id stringUser ID
activities Activity[]?List of current activities (null = cleared)