mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +00:00
Make Filters.regex work on message captions too
This commit is contained in:
parent
07276e31b9
commit
1d8fd0b836
@ -287,7 +287,7 @@ class Filters:
|
||||
"""
|
||||
|
||||
def f(_, m):
|
||||
m.matches = [i for i in _.p.finditer(m.text or "")]
|
||||
m.matches = [i for i in _.p.finditer(m.text or m.caption or "")]
|
||||
return bool(m.matches)
|
||||
|
||||
return create("Regex", f, p=re.compile(pattern, flags))
|
||||
|
Loading…
Reference in New Issue
Block a user