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

Added admin filter #809

Closed
wants to merge 5 commits into from
Closed

Added admin filter #809

wants to merge 5 commits into from

Conversation

bielarusajed
Copy link

Hello, I made admin filter for chats, may be it will be useful for anybody.

@zeroone2numeral2
Copy link
Contributor

zeroone2numeral2 commented Dec 8, 2021

every time an update is tested against this filter, a Client.get_chat_member() request is executed. This is a network-bound implicit behavior that might result in unexpected results (eg. being rate-limited by the server), I believe it should be up to the developer whether to use (and how to implement) such filters

@bielarusajed
Copy link
Author

every time an update is tested against this filter, a Client.get_chat_member() request is executed

Yes, but this is the only way to know that the user is an administrator, as I know. If someone wants to check the admin, they still have to repeat it, and this, it seems to me, is not a rare use case, therefore it can be useful as a standard filter.

But if this is really such a bad practice, then I am by no means insisting.

@nocturn9x
Copy link

Honestly I doubt this is of any usefulness. Most use cases for this are when writing chat manager bots, which need specific behavior tuned for their use case. A generic filter is rarely useful

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants