MCPcopy Create free account
hub / github.com/TechifyBots/File-Stream-Bot / send_msg

Function send_msg

biisal/utils/broadcast_helper.py:9–23  ·  view source on GitHub ↗
(user_id, message)

Source from the content-addressed store, hash-verified

7
8
9async def send_msg(user_id, message):
10 try:
11 await message.forward(chat_id=user_id)
12 return 200, None
13 except FloodWait as e:
14 await asyncio.sleep(e.x)
15 return send_msg(user_id, message)
16 except InputUserDeactivated:
17 return 400, f"{user_id} : deactivated\n"
18 except UserIsBlocked:
19 return 400, f"{user_id} : blocked the bot\n"
20 except PeerIdInvalid:
21 return 400, f"{user_id} : user id invalid\n"
22 except Exception as e:
23 return 500, f"{user_id} : {traceback.format_exc()}\n"

Callers 1

broadcast_Function · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected