RateLimitMessageFactory type
Creates a message to send when a turn is throttled.
The result.retryAfterMs value can be used to tell the user when another
activity is expected to be accepted.
Example
message: (_context, result) => {
const seconds = Math.ceil(result.retryAfterMs / 1000)
return `Too many requests. Try again in ${seconds} seconds.`
}
type RateLimitMessageFactory = (
context: TurnContext,
result: RateLimitResult
) => string | Activity | Promise<string | Activity>