aiotdlib
aiotdlib copied to clipboard
How use in windows?
my code:
async def main():
client = Client(
api_id=API_ID,
api_hash=API_HASH,
library_path='./lib',
phone_number=PHONE_NUMBER
)
async with client:
me = await client.api.get_me()
logging.info(f"Successfully logged in as {me.json()}")
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
asyncio.run(main())
error: FileNotFoundError: Could not find module 'D:\Desktop\tg_use_wls\lib' (or one of its dependencies). Try using the full path with constructor syntax.
You should provide path to tdlib binary, not to directory containing it. For example
client = Client(..., library_path="./lib/tdlib.dll")
You should provide path to tdlib binary, not to directory containing it. For example
client = Client(..., library_path="./lib/tdlib.dll")
I don't have tdlib.dll at my td installer dir.
You have to build a binary yourself. This library provides binaries only for MacOS and Linux.
Please follow build instructions for Windows by TDLib: https://tdlib.github.io/td/build.html?language=Python