Skip to content

Commit

Permalink
Fix MessageEntity.user if None
Browse files Browse the repository at this point in the history
  • Loading branch information
Badiboy committed Jun 2, 2024
1 parent eb3b699 commit 67230b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telebot/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 67230b8

Please sign in to comment.