arefathi / gas-telegram-bot-1

Google Apps Script Telegram Bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Apps Script Telegram Bot

Host your Telegram BOT on Google App Script.

Set up

  1. Visit script.google.com/start to open the script editor.
  2. Delete any code in the script editor and paste in the code in Code.gs
  3. Replace var of token with your bot token.
  4. Select the menu item File > Save. Name your new script and click OK.
  5. Select Publish > Deploy as web app.
  6. Under Project version, select New.
  7. Under Execute the app as, select your account.
  8. Under Who has access to the app, select "Anyone, even anonymous".
  9. Click Deploy.
  10. In the dialog Authorization required, click Review Permissions and click Allow.
  11. Copy the URL labeled Current web app URL and ends in /exec
  12. Replace var of publishUrl with your Current web app URL
  13. Set up the Webhook by Select the Run menu, select the function setWebhook.

Command List

/start #begin bot

/joke  #get joke

Thanks to

Original source:

https://gist.github.com/unnikked/828e45e52e217adc09478321225ec3de

Reference:

- https://github.com/ocordova/gas-telegram-bot

About

Google Apps Script Telegram Bot


Languages

Language:JavaScript 100.0%