Comments (5)
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.
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.
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.
Just curious, anyone trying running this within an AWS Lambda function ?
from gramjs.
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)
- Can't connect via ipv6 proxy
- NewMessage event not working for some channels. HOT 2
- RequestWebView missing parameters HOT 1
- Wrong returned type for createForumTopic
- Argument of Api.account.UpdateNotifySettings is wrongly typed
- Telegram Client Hangs Up on Connect HOT 5
- Empty properties in event user
- AsyncQueue reconnect
- Stops getting updates of new Messages
- Add ESM entry points
- Standardize event handling methods
- PEER_ID_INVALID and business bot
- Cant parse to dash
- how i can click reply markun button and get the response? HOT 2
- File Size Mismatch After 100MB Uploading via nodejs using GramJS
- args of progressCallback not at the correct order HOT 2
- AUTH_BYTES_INVALID and AUTH_KEY_UNREGISTERED error when trying to download the file
- how to use KeyboardButtonRequestPeer
- FullUser does not return birthday and personalChannelId
- Is it possible to pass only id, accessHash, fileReference and dcId to download_media?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gramjs.