D-Bot/readmes/Telegram-Bot/Telegram-Bot.md

27 lines
660 B
Markdown
Raw Normal View History

2015-12-31 13:48:56 -06:00
# DennyDai/D-Bot/Telegram-Bot
Based on [Telegram Bot API](https://core.telegram.org/bots)
2015-12-31 13:49:42 -06:00
## Step 1: Get Your Telegram Bot Token
2015-12-31 13:48:56 -06:00
[How do I create a bot?](https://core.telegram.org/bots#3-how-do-i-create-a-bot)
2015-12-31 13:49:42 -06:00
## Step 2: Set WebHook for Your bot
2015-12-31 13:48:56 -06:00
Run
```
2016-05-02 04:04:45 -05:00
cp VAR_BOT.php Telegram-Bot.php
2015-12-31 13:48:56 -06:00
```
2015-12-31 13:49:42 -06:00
The url of Webhook is https://YourHost/D-Bot/Telegram-Bot.php
2015-12-31 13:48:56 -06:00
Don't know how to set Webhook for Telegram Bot? See it --> [setWebhook](https://core.telegram.org/bots/api#setwebhook)
2015-12-31 13:49:42 -06:00
## Step 3: Add Your Telegram Bot Token to Config.php
2015-12-31 13:48:56 -06:00
```
define('TB_TOKEN', 'YOUR_TELEGRAM_BOT_TOKEN_HERE');
```
And then start your php server and enjoy your bot.
####Have fun :)