stream-chat-python
stream-chat-python copied to clipboard
client.on() method
For example, the Dart language has an on() method that allows you to work with events. This is very convenient, because I need not to be tied to a channel. Is there any alternative in package for python?
Dart example:
client.on().listen((event) => {
if (event.totalUnreadCount != null) {
print('unread messages count is now: ${event.totalUnreadCount}');
}
if (event.unreadChannels !== null) {
print('unread channels count is now: ${event.unreadChannels}');
}
});