D-Bot/readmes/Telegram/Telegram.md

35 lines
1.0 KiB
Markdown
Raw Normal View History

2015-05-29 12:45:34 -05:00
DennyDai/D-Bot
==============================
2015-05-29 13:22:23 -05:00
A PHP Chat Bot
2015-12-30 02:02:07 -06:00
###STOP SUPPORTED
###STOP SUPPORTED
###STOP SUPPORTED
2015-05-29 12:45:34 -05:00
Requirements
------------
2015-05-29 13:22:23 -05:00
- A running [telegram-cli](https://github.com/vysheng/tg/) listening on a unix-socket (`-S`) or a port (`-P`). Needs to be configured (phone-number, etc.) before this progarm runs.
2015-05-29 12:45:34 -05:00
- php >= 5.3.0
2015-06-04 03:15:34 -05:00
- python = 2.7.9
2015-05-29 12:45:34 -05:00
Usage
-----
###Setup telegram-cli
[telegram-cli](https://github.com/vysheng/tg/) needs to be installed.
2015-06-04 03:15:34 -05:00
And
Change Url to your BOT.php address in [Telegram.py](https://github.com/dennydai/D-bot/blob/master/readmes/Telegram/Telegram.py)
2015-05-29 12:45:34 -05:00
Then
./bin/telegram-cli -Z [Telegram.py Path Here] -dWS /tmp/tg.sck &
2015-05-29 12:45:34 -05:00
Finally,
chmod 0777 /tmp/tg.sck
If you never started telegram-cli before, you need to start it first in normal mode, so you can type in your telegram-phone-number and register it, if needed (`./bin/telegram-cli`).
2015-05-29 13:22:23 -05:00
If you are using this program under root permission and the telegram-cli failed to switch to 'telegramd', you can use "-U root" as one of the arguments.