Code Monkey home page Code Monkey logo

Comments (5)

painor avatar painor commented on September 2, 2024

Hey, I'll try to answer your questions to the best of my ability.

For deploying it doesn't really matter since any VPS that runs 24/7 and has an internet connection should be able to run it granted it has node >12. I've never dealt with GCP or AWS so I couldn't really help you with those.

You are correct you can't query members using the normal bot API.

This library doesn't only run users. it can also run normal bots that you create from @Botfather and those don't need a phone just a token.

Generated sessions can last forever granted you don't log them out from another device. ideally, you should never login more than once.

normal bots when used with this library can query member list using GetParticipants (you should use https://painor.gitbook.io/gramjs/getting-started/available-methods/getting-participants-of-a-group-channel)
for the rest, you can use Raw events and detect when a user was kicked or left. you can use the other library if you're more comfortable with it since Raw events in telegram are a bit hard to deal with.

from gramjs.

markfaulk350 avatar markfaulk350 commented on September 2, 2024

Thank you for responding so quickly! You saved me a ton of time & headaches!

I was assuming I had to use a "User Bot" in order to get the participants of a group. Now that I know I can use regular bot credentials it greatly simplifies things.

I am going to try to use this library in conjunction with npm "node-telegram-bot-api". I really only need the ability to getParticipants() from this library. The other npm package has much nicer event handlers and support for webhooks which means I can deploy this on a simple express app in GCP App Engine which doesn't need to poll 24/7.

My only concern is that I will technically have 2 telegram clients connected at the same time using the same bot credentials. Could this be a potential problem or am I overthinking things?

Also is there a way to disable the long list of blue "Debugging" logs in the terminal? Not super important, but I don't know what any of it means so it's just clutter.

from gramjs.

painor avatar painor commented on September 2, 2024

the limit for the same telegram clients connecting at the same time is around 9 or 10. after that you won't be getting updates from some of them so you should be fine.

for logging check https://gram.js.org/faq#how-do-i-stop-logging

from gramjs.

isbkch avatar isbkch commented on September 2, 2024

Just curious, anyone trying running this within an AWS Lambda function ?

from gramjs.

painor avatar painor commented on September 2, 2024

Just curious, anyone trying running this within an AWS Lambda function?

not sure how that would work. to receive updates you'd need to have a connection open so that won't work in lambda as far as I know.

from gramjs.

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.