mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge pull request #1 from bakhrullo/bakhrullo-patch-1
Update broadcast_example.py
This commit is contained in:
commit
a05796d2f2
1 changed files with 2 additions and 0 deletions
|
|
@ -35,6 +35,8 @@ async def send_message(user_id: int, text: str, disable_notification: bool = Fal
|
|||
await bot.send_message(user_id, text, disable_notification=disable_notification)
|
||||
except exceptions.BotBlocked:
|
||||
log.error(f"Target [ID:{user_id}]: blocked by user")
|
||||
except exceptions.CantInitiateConversation:
|
||||
log.error(f"Target [ID:{user_id}]: bot can't initiate conversation with a user")
|
||||
except exceptions.ChatNotFound:
|
||||
log.error(f"Target [ID:{user_id}]: invalid user ID")
|
||||
except exceptions.RetryAfter as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue