Skip to content

Commit

Permalink
Fixed a bug with hiding the token
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorKhabarov committed Apr 26, 2024
1 parent d583ff8 commit 776bd53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions telebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,8 @@ def __hide_token(self, message: str) -> str:
if self.token in message:
code = self.token.split(':')[1]
return message.replace(code, "*" * len(code))
else:
return message

def infinity_polling(self, timeout: Optional[int]=20, skip_pending: Optional[bool]=False, long_polling_timeout: Optional[int]=20,
logger_level: Optional[int]=logging.ERROR, allowed_updates: Optional[List[str]]=None,
Expand Down
2 changes: 2 additions & 0 deletions telebot/async_telebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ def __hide_token(self, message: str) -> str:
if self.token in message:
code = self.token.split(':')[1]
return message.replace(code, "*" * len(code))
else:
return message

async def _process_polling(self, non_stop: bool=False, interval: int=0, timeout: int=20,
request_timeout: int=None, allowed_updates: Optional[List[str]]=None):
Expand Down

0 comments on commit 776bd53

Please sign in to comment.