nerzh / swift-telegram-sdk

🤖 The wrapper for the Telegram Bot API written in Swift. It's not a framework. There is no special syntax here. This is a library that implements all Telegram Bot API methods, which is available to you to work with Vapor, Smoke, Hummingbird, FlyingFox.
https://core.telegram.org/bots/api#available-methods
MIT License
216 stars 32 forks source link

buttonsActionHandler does not work #1

Closed Swiftocrat closed 3 years ago

Swiftocrat commented 3 years ago

When I trying to use buttons callback as it showed in example, I'm facing problem when bot can't reply to user. It seems because bot somehow forgets chat id. Example does not work too, actually.

nerzh commented 3 years ago

Hello, I fixed example. Bot works normal, just on press button the update object does not have message

try update.message?.reply(text: update.callbackQuery?.data ?? "data not exist", bot: bot)

replace to

try update.callbackQuery?.message?.reply(text: update.callbackQuery?.data ?? "data not exist", bot: bot)
Swiftocrat commented 3 years ago

Thank you, I will try

Swiftocrat commented 3 years ago

Working

nerzh commented 3 years ago

Thank you, I will try

Thanks you, too