Feature request: Notify when stream connection lost
neekolas opened this issue · comments
Nicholas Molnar commented
Is your feature request related to a problem?
When streaming messages, the connection may be temporarily lost for a range of reasons. If callers were able to pass in a callback to be notified of connection failures they could fill in gaps in their history and ensure no messages are missed.
Describe the solution to the problem
Add an optional onDisconnect
callback hook to all streaming methods which would be called every time the connection is closed (except for cases where the caller has explicitly disconnected)
Describe the uses cases for the feature
Bots that strive for 100% deliverability of streamed messages
Additional details
No response