2016-08-26 13:58:53 +03:00
|
|
|
# Telethon
|
2016-08-28 14:43:00 +03:00
|
|
|
**Telethon** is Telegram client implementation in Python. This project's _core_ is **completely based** on
|
|
|
|
[TLSharp](https://github.com/sochix/TLSharp). All the files which are fully based on it will have a notice
|
|
|
|
on the top of the file. Also don't forget to have a look to the original project.
|
2016-08-27 12:59:23 +03:00
|
|
|
|
2016-08-28 14:43:00 +03:00
|
|
|
The files without the previously mentioned notice are no longer part of TLSharp itself, or have enough modifications
|
|
|
|
to make them entirely different.
|
2016-08-26 13:58:53 +03:00
|
|
|
|
|
|
|
### Requirements
|
2016-08-28 14:43:00 +03:00
|
|
|
This project requires the following Python modules, which can be installed by issuing `sudo -H pip install <module>` on a
|
|
|
|
Linux terminal:
|
2016-08-26 13:58:53 +03:00
|
|
|
- `pyaes` ([GitHub](https://github.com/ricmoo/pyaes), [package index](https://pypi.python.org/pypi/pyaes))
|
2016-08-28 20:26:06 +03:00
|
|
|
- `rsa` ([GitHub](https://github.com/sybrenstuvel/python-rsa), [package index](https://pypi.python.org/pypi/rsa))
|
2016-08-26 13:58:53 +03:00
|
|
|
|
|
|
|
### We need your help!
|
2016-08-28 14:43:00 +03:00
|
|
|
As of now, the project is fully **untested** and with many pending things to do. If you know both Python and C#, please don't
|
|
|
|
think it twice and help us (me)!
|
2016-08-27 12:59:23 +03:00
|
|
|
|
|
|
|
### Code generator limitations
|
|
|
|
The current code generator is not complete, yet adding the missing features would only over-complicate an already hard-to-read code.
|
2016-08-28 14:43:00 +03:00
|
|
|
Some parts of the `.tl` file _should_ be omitted, because they're "built-in" in the generated code (such as writing booleans, etc.).
|
2016-08-27 12:59:23 +03:00
|
|
|
|
|
|
|
In order to make sure that all the generated files will work, please make sure to **always** comment out these lines in `scheme.tl`
|
2016-08-28 14:43:00 +03:00
|
|
|
(the latest version can always be found
|
|
|
|
[here](https://github.com/telegramdesktop/tdesktop/blob/master/Telegram/SourceFiles/mtproto/scheme.tl)):
|
2016-08-27 12:59:23 +03:00
|
|
|
|
|
|
|
```tl
|
|
|
|
// boolFalse#bc799737 = Bool;
|
|
|
|
// boolTrue#997275b5 = Bool;
|
|
|
|
// true#3fedd339 = True;
|
|
|
|
// vector#1cb5c415 {t:Type} # [ t ] = Vector t;
|
|
|
|
```
|
|
|
|
|
2016-08-28 14:43:00 +03:00
|
|
|
Also please make sure to rename `updates#74ae4240 ...` to `updates_tg#74ae4240 ...` or similar to avoid confusion between
|
|
|
|
the `updates` folder and the `updates.py` file!
|