from telethon.sync import TelegramClient
from telethon.sessions import StringSession
api_id = ''
api_hash = ''
client = TelegramClient('session_name', api_id, api_hash)
async def main():
await client.start()
try:
target_username = '+71284567890'
target_username1 = '+71284567890'
target_username2 = '+71284567890'
target_username3 = '+71294567890'
target_user = await client.get_input_entity(target_username)
target_user1 = await client.get_input_entity(target_username1)
target_user2 = await client.get_input_entity(target_username2)
target_user3 = await client.get_input_entity(target_username3)
message = 'Hello, this is a test message.'
await client.send_message(target_user, message)
print("Message sent successfully!")
await client.send_message(target_user1, message)
print("Message sent successfully!")
await client.send_message(target_user2, message)
print("Message sent successfully!")
await client.send_message(target_user3, message)
print("Message sent successfully!")
finally:
await client.disconnect()
with client:
client.loop.run_until_complete(main())
После выполнения кода основной аккаунт вылетает, как это исправить напишите пожалуйста