Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.on() method #142

Open
Elevencode opened this issue Jun 13, 2023 · 0 comments
Open

client.on() method #142

Elevencode opened this issue Jun 13, 2023 · 0 comments

Comments

@Elevencode
Copy link

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}');
	}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant