Skip to content

Commit

Permalink
правки
Browse files Browse the repository at this point in the history
  • Loading branch information
HamletSargsyan committed Jan 17, 2025
1 parent 4c5bcad commit 8ea9c48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tinylogging/aio/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ def __init__(
self,
token: str,
chat_id: int | str,
message_thread_id: Optional[int] = None,
ignore_errors: bool = False,
**kwargs,
):
super().__init__(**kwargs)
self.token = token
self.chat_id = chat_id
self.message_thread_id = message_thread_id
self.ignore_errors = ignore_errors
self.api_url = f"https://api.telegram.org/bot{self.token}/sendMessage"

Expand All @@ -90,6 +92,7 @@ async def emit(self, record: Record):

data = {
"chat_id": self.chat_id,
"message_thread_id": self.message_thread_id,
"text": text,
"parse_mode": "HTML",
}
Expand Down

0 comments on commit 8ea9c48

Please sign in to comment.