Message History
Fetch messages using ALO's fetchHistory and fetchHistoryAround methods.
Fetch messages in reverse chronological order
You can use the fetchHistory
method to fetch messages in reverse chronological order (from newest to oldest). fetchHistory
also makes it easy to paginate through history in the direction of your choice.
fetchHistory({ channelId: string, ... })
fetchHistory({ channelId: string, ... })
Name | Type | Required | Description |
channelId | string | yes | The channel to fetch messages from. |
limit | integer | no | The maximum number of messages to fetch (defaults to 100). |
olderPageToken | string | no | The |
newerPageToken | string | no | The |
Fetch messages centered around a specific message
The fetchHistoryAround
method gives you the ability to jump back into history to a specific message and retrieve the messages that were sent immediately before and after it.
fetchHistoryAround({ channelId: string, messageId: string, ... })
Name | Type | Required | Description |
channelId | string | yes | The id of the channel for which you want to fetch history. |
messageId | string | yes | The message for which you want to fetch history around. |
limit | integer | no | The number of messages in both directions you want to fetch. For example, if you set |
Last updated