项目作者: sunuazizrahayu
项目描述 :
Google Apps Script Telegram Bot
高级语言: JavaScript
项目地址: git://github.com/sunuazizrahayu/gas-telegram-bot.git
Google Apps Script Telegram Bot
Host your Telegram BOT on Google App Script.
Set up
- Visit script.google.com/start to open the script editor.
- Delete any code in the script editor and paste in the code in Code.gs
- Replace var of
token
with your bot token. - Select the menu item File > Save. Name your new script and click OK.
- Select Publish > Deploy as web app.
- Under Project version, select New.
- Under Execute the app as, select your account.
- Under Who has access to the app, select “Anyone, even anonymous”.
- Click Deploy.
- In the dialog Authorization required, click Review Permissions and click Allow.
- Copy the URL labeled Current web app URL and ends in /exec
- Replace var of
publishUrl
with your Current web app URL - 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