diff --git a/pyrogram/api/core/object.py b/pyrogram/api/core/object.py index 24c1dcf1..c45e40bc 100644 --- a/pyrogram/api/core/object.py +++ b/pyrogram/api/core/object.py @@ -49,6 +49,9 @@ class Object: def __call__(self): pass + def __getitem__(self, item): + return getattr(self, item) + def remove_none(obj): if isinstance(obj, (list, tuple, set)):