Giter Club home page Giter Club logo

python-telegram-bot-gae's Introduction

python-telegram-bot-GAE

Little project to upload and run a Telegram Bot on Google App Engine using the python-telegram-bot library and webhooks

IMPORTANT: This project was created because there are only a few examples related to webhooks, python-telgram-bot and GAE all together and maybe none related to dispatcher and webhook working at one time.

WHAT YOU NEED

You might need to enable billing on your Google App Engine project in order to get it to work.

SETUP

  1. Copy or move config.ini.example to config.ini. Inside, replace:

    • <TELEGRAM-BOT-TOKEN> with the token BotFather gave you
    • <GAE-PROJECT-NAME> with your app's name in Google App Engine.
  2. Make a new folder called "lib" in the project root.

  3. Open a command line, navigate to your project root, type 'pip install -t lib -r requirements.txt' and wait until install is complete.

  4. Type 'gcloud config set project <GAE-PROJECT-NAME>' in the terminal.

  5. Now type 'gcloud app create' and choose your region.

  6. Type 'gcloud app deploy'.

DONE! Open your browser and visit https://<GAE-PROJECT-NAME>.appspot.com/set_webhook. You should read "Webhook set" in the page.

You may now use your new bot! The default function is just echo. Feel free to customize it all you like.

CREDITS

I used two examples found on GitHub to setup this project:

  1. https://github.com/sooyhwang/Simple-Echo-Telegram-Bot
  2. https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/echobot2.py

I acheived the final result with the help of Jannes Höke, @jh0ker on GitHub

enjoy :)

python-telegram-bot-gae's People

Contributors

kolmogorov42 avatar follonsaxbass avatar

Stargazers

Alexander Polyakov avatar

Watchers

James Cloos avatar  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.