Options
Menu

Interface IChatHistorySearchOptions

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
})

Hierarchy

  • IChatHistorySearchOptions

Index

Properties

OptionaleventFilter

eventFilter: string[]

An array of ChatHistoryEntry types to which the results will be limited

Optionalforward

forward: boolean

Set to true to return events in ascending order

Optionallimit

limit: number

The maximum number of query results

OptionalstartEvent

startEvent: number

The sequential event number at which to start the query.

[[ChatInfo.lastEventNumber]] could be a useful piece of information here.