diff --git a/pyrogram/client/types/object.py b/pyrogram/client/types/object.py index 87b32dfa..adafc8a0 100644 --- a/pyrogram/client/types/object.py +++ b/pyrogram/client/types/object.py @@ -16,6 +16,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . +import re from collections import OrderedDict from datetime import datetime from json import dumps @@ -47,6 +48,9 @@ class Object(metaclass=Meta): if isinstance(obj, bytes): return repr(obj) + if isinstance(obj, re.Match): + return repr(obj) + return OrderedDict( [("_", "pyrogram." + obj.__class__.__name__)] + [