grammyjs / grammY

The Telegram Bot Framework.
https://grammy.dev
MIT License
2.28k stars 112 forks source link

Not receiving updates for purchased_paid_media #639

Closed danielrhodes closed 3 weeks ago

danielrhodes commented 1 month ago

I'm been trying to get the updates for purchased_paid_media and I'm not seeing them in the latest bot API update (Sept 6th) and grammY v1.30.0. I've been using this template https://github.com/bot-base/telegram-bot-template/blob/main/src/main.ts (allowed updates array is blank), so I don't think I am filtering out those updates.

I've tried a few implementations, from using filter to on to even trying to install middleware to intercept it. But haven't seen anything come through so far.

Is this my error? How can I dive deeper to know what's going on.

Thank you!

KnorpelSenf commented 3 weeks ago

Do you see the updates when you use something like https://telegram.tools/update-explorer which lets you receive the updates in your browser?

macchie commented 3 weeks ago

Same here!

KnorpelSenf commented 3 weeks ago

@macchie can you maybe answer the question then? It is impossible to investigate anything with so little information, and ignoring questions doesn't help 😅

macchie commented 3 weeks ago

@macchie can you maybe answer the question then? It is impossible to investigate anything with so little information, and ignoring questions doesn't help 😅

Hope it was safe to paste my token there 😅 I cannot get any update on paid media, any other update works fine and i see the output.

KnorpelSenf commented 3 weeks ago

Yes and no. We wrote and maintain the tool, and it is free and open-source, so it can be trusted. The token never leaves your browser except to contact Telegram. That being said, it's never a good idea to paste a token into any website, period. So if you are paranoid, just revoke the token and use the new one for your bot.

Anyway, if the updates don't arrive in the tool, then it means that Telegram does not send the updates. This confirms that there is no issue with grammY, and there is no issue with your code. Most likely, the update is not being sent because you're missing one of the necessary conditions:

Also, it is a new feature, so there might be a very, very slim chance that there is a bug in Telegram somewhere. It makes sense to investigate the three documented conditions above before assuming that.

macchie commented 3 weeks ago

Can confirm that adding the payload does the trick. Thanks for support!

KnorpelSenf commented 3 weeks ago

I'll assume that @danielrhodes had the same problem before going silent. Closing. Feel free to reopen if there's an unrelated problem.