Skip to content

Commit 44a74b9

Browse files
committed
Add Filters.scheduled and Filters.from_scheduled
1 parent 047fe37 commit 44a74b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyrogram/client/filters/filters.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ class Filters:
208208
*animation*, *voice*, *video_note*, *contact*, *location*, *venue*, *poll*.
209209
"""
210210

211+
scheduled = create(lambda _, m: bool(m.scheduled), "ScheduledFilter")
212+
"""Filter messages that have been scheduled (not yet sent)."""
213+
214+
from_scheduled = create(lambda _, m: bool(m.from_scheduled), "FromScheduledFilter")
215+
"""Filter new automatically sent messages that were previously scheduled."""
216+
211217
@staticmethod
212218
def command(
213219
commands: str or list,

0 commit comments

Comments
 (0)