Interface QueryOptions

Options for querying messages in a chat room.

interface QueryOptions {
    direction?: "forwards" | "backwards";
    end?: number;
    limit?: number;
    start?: number;
}

Properties

direction?: "forwards" | "backwards"

The direction to query messages in. If forwards, the response will include messages from the start of the time window to the end. If backwards, the response will include messages from the end of the time window to the start. If not provided, the default is forwards.

forwards
end?: number

The end of the time window to query from. If provided, the response will include messages with timestamps less than this value.

Now
limit?: number

The maximum number of messages to return in the response.

100
start?: number

The start of the time window to query from. If provided, the response will include messages with timestamps equal to or greater than this value.

The beginning of time