-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instructions for how to set up telegram bot
- Loading branch information
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Set up a telegram bot | ||
- Open telegram, find BotFather and type /start and /newbot | ||
- Once created, BotFather will tell you the token to access the HTTP API. Add this as an env: TELEGRAM_BOT_TOKEN | ||
- /setprivacy @MyBotName to Enable - this means the bot will only listen to messages beginning with / or tagging the bot by name | ||
- Create a group, add the bot and any users. | ||
- add IDBot or similar to get the chat id, and add as an env: TELEGRAM_CHAT_ID | ||
- Set the webhook for the bot: | ||
- curl -F "url=https://abc123.ngrok.io/webhook" https://api.telegram.org/bot<YourBOTToken>/setWebhook | ||
- If it changes, delete it with curl https://api.telegram.org/bot<YourBOTToken>/deleteWebhook |