Skip to content

Commit

Permalink
Merge pull request #1427 from barbax7/user
Browse files Browse the repository at this point in the history
The output of get_me() is already an User object
  • Loading branch information
Badiboy authored Jan 30, 2022
2 parents 8d380b4 + 6927740 commit 80cf5d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def user(self) -> types.User:
Equivalent to bot.get_me() but the result is cached so only one API call is needed
"""
if not hasattr(self, "_user"):
self._user = types.User.de_json(self.get_me())
self._user = self.get_me()
return self._user

def enable_save_next_step_handlers(self, delay=120, filename="./.handler-saves/step.save"):
Expand Down

0 comments on commit 80cf5d8

Please sign in to comment.