mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-04 16:25:08 +00:00
Fix Filters.regex failing in case the value is None
This commit is contained in:
@@ -323,7 +323,8 @@ class Filters:
|
||||
else:
|
||||
raise ValueError("Regex filter doesn't work with {}".format(type(update)))
|
||||
|
||||
update.matches = list(flt.p.finditer(value)) or None
|
||||
if value:
|
||||
update.matches = list(flt.p.finditer(value)) or None
|
||||
|
||||
return bool(update.matches)
|
||||
|
||||
|
Reference in New Issue
Block a user