Giter Club home page Giter Club logo

Comments (6)

virtualstaticvoid avatar virtualstaticvoid commented on June 21, 2024 1

Hi @selesnow

Great idea! I'm not familiar with telegram so I had to do some reading up.

I found this blog post on how to deploy a telegram bot to Heroku using Python, so I got an idea of how it could be implemented using R.

I looked at the telegram.bot R package you suggested but it doesn't appear to implement support for receiving webhook requests which would mean having to run on Heroku using a paid for dyno, such as Hobby, in order to run as a background worker process to poll for telegram updates.

I'll have a go at implementing it using polling method and update here my progress.

As a side note, I noticed that telegram.bot doesn't fully implement the telegram API. E.g. The setWebhook method doesn't support all the arguments provided by the API, such as secret_token which would enable webhook requests to be verified.

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on June 21, 2024 1

Hi @selesnow

I've created an example project virtualstaticvoid/heroku-telegram-bot-webhook and created a pull request to the telegram.bot R package with the changes to support webhooks, since Heroku requires a paid-for dyno to run a background polling process (for using the Updater method which requires long polling to work).

from heroku-buildpack-r.

virtualstaticvoid avatar virtualstaticvoid commented on June 21, 2024 1

For completeness, I've added a second example project virtualstaticvoid/heroku-telegram-bot-updater which uses the Updater class, to run as a background process.

from heroku-buildpack-r.

selesnow avatar selesnow commented on June 21, 2024

Great, thanks a lot!

For setWebhook method, we can send feature request for telegram.bot author

from heroku-buildpack-r.

selesnow avatar selesnow commented on June 21, 2024

Great, thanks a lot!

from heroku-buildpack-r.

selesnow avatar selesnow commented on June 21, 2024

Thanks!!!

from heroku-buildpack-r.

Related Issues (20)

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.