A telegram bot to allow Eusoffians to request for favours and also help others with daily work, such as tapaoing food.
To use this, you'll need.
-
Telegram bot Token
-
A google account
-
Spreadsheet IDs to the necessary in google sheet format (upload files from this folder to google drive and convert to google sheets files through File > Save as Google Sheets)
- With npm installed, install clasp globally
npm install -g @google/clasp
-
Run yarn to install dependencies
-
Enable the Google Apps Script API
-
Then login to Google, clasp login
-
Create the google app, clasp create --title "Eusoff Simp Bot" --type webapp --rootDir src
-
Copy config.js.example into config.js, replace all placeholder values with your own, except for deployment id.
-
Deploy it using clasp deploy to get the deployment id.
-
Take note of the deployment id after Created version x e.g.
Created version 1.
- <<YOUR DEPLOYMENT ID HERE>> @1.
Now set the deployment id in secret.js along with the bot token and sheet ids.
-
Run clasp push and clasp deploy -i <> to push your code to Google Scripts and deploy it again
-
Run clasp open to open it in google script
-
Click config.js, and click Run > Run Function > setWebHook
-
It will ask you to authorise (for the first time), and it should be ok to do so, click Advanced > Go to Eusoff Simp Bot (unsafe) > Allow
-
Open the app by clasp open --webapp, select the version with your deployment id to open. (This will automatically reset the telegram bot's webhooks)
When you want to update your telegram bot with the current code, use clasp push && clasp deploy -i <>