Simple Telegram Bot:
Last updated
Last updated
follow these instructions to get a simple Telegram Bot setup
Open telegram chat in your browser or mobile phone
Add the user BotFather
Click start
Click /newbot
Follow the Instructions
Wait for the Token to be displayed referred to as [myauthorization-token]
Go to the Administration Portal of Ministry.Chat and the Integrations Page
Create a new Incoming Webhook following these instructions
Enable script
Paste the following
Copy incoming webhook URL from Ministry.Chat
Change following URL with your token and Incoming webhookURL and execute in regular browser https://api.telegram.org/bot[myauthorization-token]/setwebhook?url=[Incoming_Webhook_Link_from_Ministry.Chat]
Receive the message { "ok": true, "result": true, "description": "Webhook successfully set" }
(or similar)
Test your incoming Webhook by sending a telegram message to the bot. It should be posted in the channel/user you specified in the incoming webhook. Check Ministry.Chat's Logs and write down chat_id
(or [chat-id]
)
Create outgoing webhook and specify channel with the following url: https://api.telegram.org/bot[myauthorization-token]/sendMessage?chat_id=[chat-id]
Paste the Outgoing Webhook below.
Enable listening at the Bot with /privacy and to disable (example)
Add Bot to telegram group and utilize nice cross platform communication.
Enjoy! Please note, this was a community submission and is very simple. If you feel there are improvements which can be made, please feel free to submit improvements via pull requests!! :heart: