| 259 | await sts_msg.edit(f"Bʀᴏᴀᴅᴄᴀꜱᴛ Cᴏᴍᴩʟᴇᴛᴇᴅ: \nCᴏᴍᴩʟᴇᴛᴇᴅ Iɴ `{completed_in}`.\n\nTᴏᴛᴀʟ Uꜱᴇʀꜱ {total_users}\nCᴏᴍᴩʟᴇᴛᴇᴅ: {done} / {total_users}\nSᴜᴄᴄᴇꜱꜱ: {success}\nFᴀɪʟᴇᴅ: {failed}") |
| 260 | |
| 261 | async def send_msg(user_id, message): |
| 262 | try: |
| 263 | await message.copy(chat_id=int(user_id)) |
| 264 | return 200 |
| 265 | except FloodWait as e: |
| 266 | await asyncio.sleep(e.value) |
| 267 | return send_msg(user_id, message) |
| 268 | except InputUserDeactivated: |
| 269 | logger.info(f"{user_id} : Dᴇᴀᴄᴛɪᴠᴀᴛᴇᴅ") |
| 270 | return 400 |
| 271 | except UserIsBlocked: |
| 272 | logger.info(f"{user_id} : Bʟᴏᴄᴋᴇᴅ Tʜᴇ Bᴏᴛ") |
| 273 | return 400 |
| 274 | except PeerIdInvalid: |
| 275 | logger.info(f"{user_id} : Uꜱᴇʀ Iᴅ Iɴᴠᴀʟɪᴅ") |
| 276 | return 400 |
| 277 | except Exception as e: |
| 278 | logger.error(f"{user_id} : {e}") |
| 279 | return 500 |