getHistory

Get chat history. User-only.

PARAMETERS
chatId: ID

The identifier of the chat to get its history.

after?: Message

The oldest message to get messages after.

limit?: number

The maximum number of results to return. Must be in the range of 1-100. Defaults to 100.

RESULT
SYNTAX
// Required parameters only.
await client.getHistory(chatId);

// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.getHistory(chatId, { after, limit });