stream-chat-python icon indicating copy to clipboard operation
stream-chat-python copied to clipboard

client.on() method

Open Elevencode opened this issue 2 years ago • 0 comments

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}');
	}
});

Elevencode avatar Jun 13 '23 17:06 Elevencode