From 8e6ef3ffff3bd1b12c1d23b792398f33a47175be Mon Sep 17 00:00:00 2001 From: dennydai Date: Fri, 1 Jan 2016 03:48:56 +0800 Subject: [PATCH] add README for Telegram-Bot --- README.md | 2 +- readmes/Telegram-Bot/Telegram-Bot.md | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08029de..dcc5bb9 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ This project is now in a very early stage since Telegarm is the only supported p Supported Chat Tools List ---------- - ~~[Telegram](https://telegram.org) - [README](https://github.com/dennydai/D-bot/blob/master/readmes/Telegram/Telegram.md)~~ - - [Telegram-Bot](https://core.telegram.org/bots) - [README](#) + - [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](#) \ No newline at end of file diff --git a/readmes/Telegram-Bot/Telegram-Bot.md b/readmes/Telegram-Bot/Telegram-Bot.md index e69de29..711fa02 100644 --- a/readmes/Telegram-Bot/Telegram-Bot.md +++ b/readmes/Telegram-Bot/Telegram-Bot.md @@ -0,0 +1,29 @@ +# DennyDai/D-Bot/Telegram-Bot + +Based on [Telegram Bot API](https://core.telegram.org/bots) + +## How to SetUp this Bot + +### Step 1: Get Your Telegram Bot Token + +[How do I create a bot?](https://core.telegram.org/bots#3-how-do-i-create-a-bot) + +### Step 2: Set WebHook for Your bot + +Run +``` +cp Telegram-Bot.php VAR_BOT.php +``` +and the url of Webhook is https://YourHost/D-Bot/Telegram-Bot.php + +Don't know how to set Webhook for Telegram Bot? See it --> [setWebhook](https://core.telegram.org/bots/api#setwebhook) + +### Step 3: Add Your Telegram Bot Token to Config.php + +``` +define('TB_TOKEN', 'YOUR_TELEGRAM_BOT_TOKEN_HERE'); +``` + +And then start your php server and enjoy your bot. + +####Have fun :) \ No newline at end of file