gramjs
gramjs copied to clipboard
Extreme delay when receiving messages
I'm getting extremely delay when receiving messages on my nodeJS bot after they've been broadcasted.
My code is:
telegramClient.addEventHandler(async (event) => { await processChannelMessage(event, "-100" + event.message.peerId.channelId.toString()); }, new NewMessage({chats: telegramChannels}));
The delay is variable but usually from between 10 seconds to around 40 seconds. Sometimes messages from channels I'm subscribed to come instantly however (<1 sec).
I checked message.date and it's the exact time that the message was posted (reading from Telegram desktop).
Is this a known issue? Is it gramjs's problem or TG servers / API? I've tried it on my home PC which has good internet (50mbps) and also done it on an AWS VM with same issue.
Is there anything else I can try to improve it? Cheers.
Do these channels have a lot of members ? it's known that telegram will send messages with some delay in huge channels unless you "show interest" in them.
Do these channels have a lot of members ? it's known that telegram will send messages with some delay in huge channels unless you "show interest" in them.
Hmm maybe you're onto something. I notice that with using my own channels (1/2 subs) the msgs get processed almost instantly. However the channels I'm interested in have 10k+ subs. Is there any info on this delay, how to 'show interest'? Cheers!