Cloud Telegram Bot
-1. Find @BotFather in Telegram and send them "/newbot" and name of your new bot after that
- Remember token of your bot
- Download this repo as ZIP
- Unpack
- Go inside "cloud-telegram-bot-master", select all files and folders inside and archive. It will help to avoid python package names limitations.
- Go to https://my.selectel.ru -> Cloud Platform -> Functions, tap "Create function"
- Upload ZIP file
- Set "Path to the file" to "bot/tele_bot"
- Set "Function to execute" to "main"
- Add item to "Environment variables", name it "TOKEN" and insert token of your bot as value.
- Click "Save and deploy"
- Mark "HTTP-request" as public
- Find @SelectelServerless_bot in Telegram (it has exactly same code which you see in github)
- To register webhook on your cloud function, send them
/setwebhook <you bot token> <public URL of your function>
- After that
/getwebhook <you bot token>
. Here you can see status of how Telegram connects with your cloud function
Done. Your bot will receive messages and answer to you.
P.S.: Send sticker to the bot to get a code to use in your bot.