diff --git a/telebot/types.py b/telebot/types.py index bd9688cb7..9055091e9 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -1526,6 +1526,8 @@ def html_caption(self): """ Returns html-rendered caption. """ + if self.caption is None: + return None return apply_html_entities(self.caption, self.caption_entities, getattr(self, "custom_subs", None)) @property