screeps-api
    Preparing search index...

    Interface UserResourceEvent

    WebSocket event for updates to account-bound resources.

    When subscribed, the server will send an event whenever a resource amount is updated.

    interface UserResourceEvent {
        data: UserResourceEventData;
        id?: string;
        path: "resources";
        type: "user";
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    The event payload. Extensions of this interface should specify a more precise type.

    id?: string

    ID of the entity the event is reporting on. Undefined when type is server.

    Examples:

    • User ID for user events
    • Room name (shard0/W0N0, W0N0, etc) for room events
    path: "resources"

    When non-empty, indicates that the event concerns a property or aspect of type.

    Examples:

    • /resources for user-type events indicates an update to resource counts
    type: "user"