getMessagesBefore

open override fun getMessagesBefore(messageId: Snowflake, channelId: Snowflake, limit: Int?): Flow<Message>(source)

Requests a flow of messages created before the Message with the messageId in the MessageChannel with the channelId.

The flow may use paginated requests to supply messages, limit will limit the maximum number of messages supplied and may optimize the batch size accordingly. null means no limit.

The returned flow is lazily executed, any RequestException will be thrown on terminal operators instead.

Throws

if a limit< 1 was supplied.