from opentele.tl.configs import API
from config import api_hash, api_id
from telethon.sync import TelegramClient
from python_socks import ProxyType
api = API.TelegramIOS.Generate()
client=TelegramClient('session/79829815504.session', api.api_id, api.api_hash,proxy = (ProxyType.HTTP, '93.190.142.139', 12258, True, '2744931-mobile-country-RU', '2532mo0btx'), system_version=api.system_version, device_model=api.device_model, app_version=api.app_version) client.start('79829815504')
Вот такая ошибка вылазит:
Traceback (most recent call last):
File "c:\Users\mailr\Desktop\0.4Ekat\test.py", line 10, in client.start('79829815504')
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\auth.py", line 128, in start else self.loop.run_until_complete(coro)
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result()
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\auth.py", line 184, in _start await self.send_code_request(phone, force_sms=force_sms)
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\auth.py", line 434, in send_code_request result = await self(functions.auth.SendCodeRequest(
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered)
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 67, in _call future = sender.send(request, ordered=ordered)
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\network\mtprotosender.py", line 181, in send
state = RequestState(request)
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\network\requeststate.py", line 17, in init
self.data = bytes(request)
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\tl\tlobject.py", line 194, in bytes return self._bytes()
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\tl\functions\auth.py", line 644, in _bytes
self.serialize_bytes(self.api_hash),
File "C:\Users\mailr\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\tl\tlobject.py", line 112, in serialize_bytes
raise TypeError( TypeError: bytes or str expected, not <class 'int'>