PaulSonOfLars / gotgbot

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.
MIT License
493 stars 108 forks source link

Adding a handler for a NewPreCheckoutQuery - no precheckoutquery.All option #172

Closed svscorp closed 3 months ago

svscorp commented 3 months ago

Description of the problem / feature request

I am trying to add a handler for PreCheckoutQuery. When I do it for a Callback, this is the syntax: dispatcher.AddHandler(handlers.NewCallback(callbackquery.All, processCallbackQuery))

however, for a PreCheckoutQuery, I'd expect something like

dispatcher.AddHandler(handlers.NewPreCheckoutQuery(precheckoutquery.All, processPreCheckoutQuery))

but I didn't find it. Instead, I found 2 shippingquery.All - one, for ShippingQuery itself, which seems legit. 2nd is for PreCheckoutQuery, but under package ShippingQuery

Screenshot 2024-07-03 at 16 49 27

PaulSonOfLars commented 3 months ago

Hey, thanks for reporting; looks like that was a copypasta mistake with package names. Should be fixed in #173, if youd like to give that try!

You can probably tell that my bots don't use payments...

svscorp commented 3 months ago

Tested against the branch of #173 All works!

svscorp commented 3 months ago

@PaulSonOfLars no worries, as a community we help :)

You can probably tell that my bots don't use payments... I tested, payments via CC and Stars work End to End.

svscorp commented 3 months ago

@PaulSonOfLars can you please create a new tag for go.mod? Otherwise I have to hook to the branch, and now a previous version (without this change) is available only: v2.0.0-rc.28

PaulSonOfLars commented 3 months ago

I'm not going to cut a new release for a change with such a narrow impact and which can easily be fixed by pinning to a new commit. There are a few other changes I'd like to make before a next version.

If you urgently need the latest changes, you can pin to the commit you need by using go get <module>@<commit hash>

svscorp commented 3 months ago

Yes, that's what I using. Okay. Clear.