Skip to content

Commit

Permalink
Add instructions for how to set up telegram bot
Browse files Browse the repository at this point in the history
  • Loading branch information
rukayaj committed May 11, 2024
1 parent 19c73dc commit ba61adc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
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

0 comments on commit ba61adc

Please sign in to comment.