Git Product home page Git Product logo

shuxiaokai / serverless_telegram_bot_example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from selectel/serverless_telegram_bot_example

0.0 0.0 0.0 7 KB

Example of Telegram bot based on Selectel Serverless Functions

Home Page: https://kb.selectel.ru/docs/selectel-cloud-platform/serverless/instructions/how_to_create_a_telegram_bot/?utm_source=github.com&utm_medium=selectel/cloud-telegram-bot&utm_campaign=repo_description

Python 100.00%

serverless_telegram_bot_example's Introduction

Cloud Telegram Bot

-1. Find @BotFather in Telegram and send them "/newbot" and name of your new bot after that

  1. Remember token of your bot
  2. Download this repo as ZIP
  3. Unpack
  4. Go inside "cloud-telegram-bot-master", select all files and folders inside and archive. It will help to avoid python package names limitations.
  5. Go to https://my.selectel.ru -> Cloud Platform -> Functions, tap "Create function"
  6. Upload ZIP file
  7. Set "Path to the file" to "bot/tele_bot"
  8. Set "Function to execute" to "main"
  9. Add item to "Environment variables", name it "TOKEN" and insert token of your bot as value.
  10. Click "Save and deploy"
  11. Mark "HTTP-request" as public
  12. Find @SelectelServerless_bot in Telegram (it has exactly same code which you see in github)
  13. To register webhook on your cloud function, send them /setwebhook <you bot token> <public URL of your function>
  14. 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.

serverless_telegram_bot_example's People

Contributors

maxvyaznikov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.