Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My bot has stopped receiving notifications chat_member, my_chat_member, chat_join_reuest. #1139

Open
hailovigor opened this issue Oct 11, 2023 · 20 comments

Comments

@hailovigor
Copy link

Question

Hello!

This is not the first time that my bot has stopped receiving notifications chat_member, my_chat_member, chat_join_reuest. All this is written in getWebhookInfo. Telegram simply does not send this data. It sends messages, sends data about the buttons pressed.

I tried deleting and re-specifying the webhook. Turned it on via polling. But nothing helps.
Last time a few hours passed and everything worked by itself.
But this is a very long time. My users will eat me up.

@hailovigor
Copy link
Author

There was a second site that could duplicate the connection. Reloading the token helped. But disabling the second site helped more :)

@bluetyphoon77
Copy link

Hi @hailovigor
I've an issue that is maybe close to yours.
Since you solved it and no support is finding why new_chat_members is not working properly, have you maybe any insight about this?
Did telegram change something, making events from library unable to work as intended ?
Thanks

@hailovigor
Copy link
Author

Check getWebhookInfo. Is this event added there?

@hailovigor
Copy link
Author

If I insert logs into processing webhook requests, I didn’t have any data there either.
This is not a library

@bluetyphoon77
Copy link

@hailovigor Hi Igor thanks for your help. Thanks for your test! Does this mean it did not work for you either to catch new members? So node-telegram-bot is not updated ?

@OfirYC
Copy link

OfirYC commented Jan 29, 2024

i am also receiving this issue actually via other package (grammyJS)

@hailovigor
Copy link
Author

This library works fine. But sometimes I get a 429 error for bot authorization and a block for 30 minutes. I have thousands of users, but the bot does not work for so long! I wish I knew the limits and rules so as not to get blocked.

@hailovigor
Copy link
Author

Regarding the topic. Check the data in webhook. If the data does not arrive there. Then check GetWebhookInfo. Add the desired event there. If all else fails, create a new token.

@OfirYC
Copy link

OfirYC commented Jan 29, 2024

Regarding the topic. Check the data in webhook. If the data does not arrive there. Then check GetWebhookInfo. Add the desired event there. If all else fails, create a new token.

Actually, i did both - made sure event is listened to via this method + tried to generate a new token (and even a completely new bot). unfortunately it is still inconsistantly sending me these events.

It does feel like some rate limit/rule broken by the bot and also i wish that it was public! i sent a message to Telegram support hopefully they will reply

@bluetyphoon77
Copy link

Regarding the topic. Check the data in webhook. If the data does not arrive there. Then check GetWebhookInfo. Add the desired event there. If all else fails, create a new token.

Actually, i did both - made sure event is listened to via this method + tried to generate a new token (and even a completely new bot). unfortunately it is still inconsistantly sending me these events.

It does feel like some rate limit/rule broken by the bot and also i wish that it was public! i sent a message to Telegram support hopefully they will reply

Hi @OfirYC @hailovigor
With your answers I realize I'm not the only one having problem to get this event!
Great you sent a message to telegram support but why devs are not doing this themselves, by fixing those issues? Why are they not listening to the community?

Do you know any library that works to get this simple new members event ? Cheers

@hailovigor
Copy link
Author

Do you have this error with different bots?

@OfirYC
Copy link

OfirYC commented Jan 29, 2024

Do you have this error with different bots?

Yeap. tried even creating new bot.

@OfirYC
Copy link

OfirYC commented Jan 29, 2024

Regarding the topic. Check the data in webhook. If the data does not arrive there. Then check GetWebhookInfo. Add the desired event there. If all else fails, create a new token.

Actually, i did both - made sure event is listened to via this method + tried to generate a new token (and even a completely new bot). unfortunately it is still inconsistantly sending me these events.
It does feel like some rate limit/rule broken by the bot and also i wish that it was public! i sent a message to Telegram support hopefully they will reply

Hi @OfirYC @hailovigor With your answers I realize I'm not the only one having problem to get this event! Great you sent a message to telegram support but why devs are not doing this themselves, by fixing those issues? Why are they not listening to the community?

Do you know any library that works to get this simple new members event ? Cheers

i hope they answer quickyl and shed some light on it, for now it seems like my users will have to suffer for a bit :(

A workaround i am expermiting with right now is accessing update.message.new_chat_members or .left_chat_member.

But i was told that this is wont work in all cases because in super group it wont send it.

do you have telegram? msg me on @perpiepapa maybe we can debug together, because i wanna test on supergroup but having hard time to do it.

@bluetyphoon77
Copy link

Regarding the topic. Check the data in webhook. If the data does not arrive there. Then check GetWebhookInfo. Add the desired event there. If all else fails, create a new token.

Actually, i did both - made sure event is listened to via this method + tried to generate a new token (and even a completely new bot). unfortunately it is still inconsistantly sending me these events.
It does feel like some rate limit/rule broken by the bot and also i wish that it was public! i sent a message to Telegram support hopefully they will reply

Hi @OfirYC @hailovigor With your answers I realize I'm not the only one having problem to get this event! Great you sent a message to telegram support but why devs are not doing this themselves, by fixing those issues? Why are they not listening to the community?
Do you know any library that works to get this simple new members event ? Cheers

i hope they answer quickyl and shed some light on it, for now it seems like my users will have to suffer for a bit :(

A workaround i am expermiting with right now is accessing update.message.new_chat_members or .left_chat_member.

But i was told that this is wont work in all cases because in super group it wont send it.

do you have telegram? msg me on @perpiepapa maybe we can debug together, because i wanna test on supergroup but having hard time to do it.

Hey 😊👍
Since I'm really beginner, I'm OK to help testing by entering the group, to help you check if event triggers. And when you find the solution please share it then and I'll try to put it in my script 😊
OK I'll write to you. Let's hope devs will fix this asap ....

@hailovigor
Copy link
Author

hailovigor commented Jan 29, 2024

I talked to support . I was asked "is there only one instance running?"

@OfirYC
Copy link

OfirYC commented Jan 29, 2024

I talked to them. I was asked "is there only one instance running?"

why did they ask that? whats the underlying logic? what are they checking exactly? that's too vague to figure out whats going on

@hailovigor
Copy link
Author

I had a “transition” from the old bot code to the new one. These are two different sites. I turned on the new site, and threw telegram webhook events on the old one. And it seems that this knocked everything out so that the new token helped. ( Of course, I tried different order of launching the site.)

@hailovigor hailovigor reopened this Jan 29, 2024
@OfirYC
Copy link

OfirYC commented Jan 29, 2024

what do you mean by site?

thats not my case anyway, and also Telegram doesnt let u to set up 2 different instances of a single bot afaik

@bluetyphoon77
Copy link

Regarding the topic. Check the data in webhook. If the data does not arrive there. Then check GetWebhookInfo. Add the desired event there. If all else fails, create a new token.

Actually, i did both - made sure event is listened to via this method + tried to generate a new token (and even a completely new bot). unfortunately it is still inconsistantly sending me these events.
It does feel like some rate limit/rule broken by the bot and also i wish that it was public! i sent a message to Telegram support hopefully they will reply

Hi @OfirYC @hailovigor With your answers I realize I'm not the only one having problem to get this event! Great you sent a message to telegram support but why devs are not doing this themselves, by fixing those issues? Why are they not listening to the community?
Do you know any library that works to get this simple new members event ? Cheers

i hope they answer quickyl and shed some light on it, for now it seems like my users will have to suffer for a bit :(

A workaround i am expermiting with right now is accessing update.message.new_chat_members or .left_chat_member.

But i was told that this is wont work in all cases because in super group it wont send it.

do you have telegram? msg me on @perpiepapa maybe we can debug together, because i wanna test on supergroup but having hard time to do it.

There is still no follow up by the main devs.
I'm checking telegraf since this telegram node api is not properly updated and maintained

@Sp3rick
Copy link
Contributor

Sp3rick commented Apr 24, 2024

Hi! seems that node-telegram-bot-api does not automatically add telegram optional updates, i tryed to add it to getUpdates opts in telegramPolling.js (line 137-141) but for some reason does not works, i hope that someone is going to fix this

Currently a workaround is asking telegram again to receive this updates:
await bot.setWebHook("",{allowed_updates: JSON.stringify(["message", "edited_channel_post", "callback_query", "message_reaction", "message_reaction_count", "chat_member"])})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants