An array of ChatHistoryEntry types to which the results will be limited
Set to true to return events in ascending order
The maximum number of query results
The sequential event number at which to start the query.
[[ChatInfo.lastEventNumber]] could be a useful piece of information here.
An object containing some options for fetching chat history. By default, all events in this chat are returned, not just the actual messages. Also, by default events are returned in descending order, starting from the end.
To return the last 25 messages:
chat.getHistory({ limit: 25, eventFilter: [ChatMessageEvent.NAME] })
To return the first 10 events:
chat.getHistory({ startEvent: 0, limit: 10, forward: true })