-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
We currently have
Filters.privatefor private chatsFilters.updates.channel_postfor channel postsFilters.groupfor normal and supergroups
We're missing a standalone supergroup filter. Different ideas listed below. Personally, I'd go for 3.
Proposal 1: Minimal invasive
- Add
Filters.supergroup - Document that
Filters.groupallows both
Proposal 2: Adding flags
- Add a flag to
Filters.groupto specify, whether supergroups should be allowed or not
Proposal 3: The full way
- Add
Filters.chat_typethat basically acts likeFilters.chat/user/via_bot, just withupdate.effective_message.chat.type. We don't need to haveFilters.chat_typeupdatetable, though IMHO. I really don't see a usecase for that. - Add shortcuts for
private, channel, (super)groupas attributes toFilters.chat_type(similar to theFilters.dice) - Make
Filters.private, groupshortcuts that work withFilters.chat_typeand deprecate them (addingTelegramDeprecationWarningand documenting it)
By this, we would have two checks for channel (Filters.chat_type.channel and Filters.update.channel_post(s)), but especially is the latter allows to differentiate between original and edited channel post, I thinks both have their value.
Metadata
Metadata
Assignees
Labels
No labels