diff --git a/telebot/types.py b/telebot/types.py index 3358965b5..6ec9d8d4d 100644 --- a/telebot/types.py +++ b/telebot/types.py @@ -1665,7 +1665,7 @@ def to_dict(self): "offset": self.offset, "length": self.length, "url": self.url, - "user": self.user.to_dict(), + "user": self.user.to_dict() if self.user else None, "language": self.language, "custom_emoji_id": self.custom_emoji_id}