Remove Readme of Telegram
This commit is contained in:
parent
86b29075e9
commit
515aacbccb
@ -7,6 +7,6 @@ This project is now in a very early stage since Telegarm is the only supported p
|
|||||||
|
|
||||||
Supported Chat Tools List
|
Supported Chat Tools List
|
||||||
----------
|
----------
|
||||||
- ~~[Telegram](https://telegram.org) - [README](https://github.com/dennydai/D-bot/blob/master/readmes/Telegram/Telegram.md)~~
|
- ~~[Telegram](https://telegram.org) - [README](#)~~
|
||||||
- [Telegram-Bot](https://core.telegram.org/bots) - [README](https://github.com/dennydai/D-bot/blob/master/readmes/Telegram-Bot/Telegram-Bot.md)
|
- [Telegram-Bot](https://core.telegram.org/bots) - [README](https://github.com/dennydai/D-bot/blob/master/readmes/Telegram-Bot/Telegram-Bot.md)
|
||||||
- [Wechat-MP](http://www.wechat.com/) - [README](#)
|
- [Wechat-MP](http://www.wechat.com/) - [README](#)
|
@ -1,34 +0,0 @@
|
|||||||
DennyDai/D-Bot
|
|
||||||
==============================
|
|
||||||
A PHP Chat Bot
|
|
||||||
###STOP SUPPORTED
|
|
||||||
###STOP SUPPORTED
|
|
||||||
###STOP SUPPORTED
|
|
||||||
|
|
||||||
Requirements
|
|
||||||
------------
|
|
||||||
- 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.
|
|
||||||
- php >= 5.3.0
|
|
||||||
- python = 2.7.9
|
|
||||||
|
|
||||||
Usage
|
|
||||||
-----
|
|
||||||
|
|
||||||
###Setup telegram-cli
|
|
||||||
[telegram-cli](https://github.com/vysheng/tg/) needs to be installed.
|
|
||||||
|
|
||||||
And
|
|
||||||
|
|
||||||
Change Url to your BOT.php address in [Telegram.py](https://github.com/dennydai/D-bot/blob/master/readmes/Telegram/Telegram.py)
|
|
||||||
|
|
||||||
Then
|
|
||||||
|
|
||||||
./bin/telegram-cli -Z [Telegram.py Path Here] -dWS /tmp/tg.sck &
|
|
||||||
|
|
||||||
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`).
|
|
||||||
|
|
||||||
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.
|
|
@ -1,11 +0,0 @@
|
|||||||
#coding:utf-8
|
|
||||||
import tgl
|
|
||||||
import urllib
|
|
||||||
import urllib2
|
|
||||||
|
|
||||||
def on_msg_receive(msg):
|
|
||||||
params = urllib.urlencode({'from': msg.src.name.encode("UTF-8"), 'text': msg.text.encode("UTF-8"), 'to': msg.dest.name.encode("UTF-8")})
|
|
||||||
f = urllib.urlopen("[your BOT.php Url Here]?%s" % params)
|
|
||||||
print f.read()
|
|
||||||
|
|
||||||
tgl.set_on_msg_receive(on_msg_receive)
|
|
Loading…
Reference in New Issue
Block a user