Add Google Apps Script version

This commit is contained in:
2023-01-13 20:15:44 +00:00
parent cab5744efd
commit 70cd5bbaa4
2 changed files with 46 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
# Tangmo FxTwitter Bot (Google Apps Script version)
Telegram bot that monitor for a message with just Twitter link without preview and reply with [FxTwitter](https://github.com/FixTweet/FixTweet) link
1. Register Telegram bot
1. Setup Google Apps Script
1. Create a Google Sheets
1. Click Extensions > Apps Script.
1. Paste the code from this repo, click "Save"
1. Go to Project Settings tab
1. Scroll to the bottom, "Script Properties", and add a `TELEGRAM_BOT_TOKEN` property
1. At the top right of the script project, click Deploy > New deployment > Web app. Run as me, anyone can access
1. Copy the webapp URL. It should look like https://script.google.com/macros/s/some-long-id/exec
1. Register Web hook
```sh
curl --request POST \
--url https://api.telegram.org/bot123:bottokenhere/setWebhook \
--header 'Content-Type: application/json' \
--data '{"url": "https://script.google.com/macros/s/some-long-id/exec"}'
```
1. It should work now