🤖 A simple Telegram Bot that replies with a random quote from quotesondesign.com
The step by step explanation is available in my blog.
You can test it just by starting a conversation with DesignQuotesBot and sending the command /quote
.
- 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 the constants
API_TOKEN
andBOT_USERNAME
. - Select the menu item File > Save. Name your new script and click OK.
- Select the Run menu, select the function doPost.
- In the dialog Authorization required, click Review Permissions and click Allow.
- 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.
- Copy the URL labeled Current web app URL and ends in /exec
- Set up the Webhook by visting the URL in your browser:
https://api.telegram.org/bot<API_TOKEN>/setWebhook?url=<WEB_APP_URL>
This is free and unencumbered software released into the public domain. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.
❤