rapierorg / telegram-bot-swift

Telegram Bot SDK for Swift (unofficial)
https://github.com/rapierorg/telegram-bot-swift/wiki
Apache License 2.0
374 stars 63 forks source link

What function gets the bot's last response? #10

Closed simonnarang closed 8 years ago

simonnarang commented 8 years ago

😅 Haven't been able to find it

zmeyc commented 8 years ago

In 0.4.1?

zmeyc commented 8 years ago

Response to which request?

simonnarang commented 8 years ago

Yes in the latest version

simonnarang commented 8 years ago

I mean the last thing the bot sent to the user

simonnarang commented 8 years ago

like lastMessage but for the bot, not the user.

zmeyc commented 8 years ago

I guess this needs to be tracked by the bot itself. Once it's sent it's gone. :) Also, bot can send different types of content to user, not only text, so it's hard to support this at library level.

Something like: sessions[bot.lastMessage.chat.id] = "last phrase I sent"

I'll add sqlite example soon with example how data can be persisted in database.

simonnarang commented 8 years ago

Ok thanks