Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
refactor: note for Nguyen
Browse files Browse the repository at this point in the history
hehe
  • Loading branch information
KevinNitroG committed Jan 1, 2025
1 parent c3547d6 commit 91dee91
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/check_phat_nguoi/notify/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def __init__(
self.session: ClientSession = ClientSession()

async def _send_message(self, message: str) -> None:
# FIXME: specify which plate is successfully send, or fail
# FIXME: use fstring instead of string format
url = API_URL.format(bot_token=self._telegram.bot_token)
payload = {
"chat_id": self._telegram.chat_id,
Expand Down Expand Up @@ -52,10 +54,7 @@ async def _send_message(self, message: str) -> None:
)
except ClientConnectionError:
logger.error(
"Unable to sending message for chat_id:{chat_id} and bot_token:{bot_token}".format(
chat_id=self._telegram.chat_id,
bot_token=self._telegram.bot_token,
)
f"Unable to sending message for chat_id:{self._telegram.chat_id} and bot_token:{self._telegram.bot_token}"
)
except Exception as e:
logger.error(e)
Expand Down

0 comments on commit 91dee91

Please sign in to comment.