botman / driver-telegram

BotMan Telegram Driver
MIT License
88 stars 75 forks source link

"date": field #27

Closed riccardogiorato closed 6 years ago

riccardogiorato commented 6 years ago

I'm trying to understand when can I extend your driver to get the telegram "date" of a message.

In my bot I'd love to get the user datetime sent by Telegram POST request on every message to handle some logic.

Is it possible?

christophrumpel commented 6 years ago

Hey @Giorat , is the time in the payload? You can grab the whole payload for every message with $bot->getMessage()->getPayload().

riccardogiorato commented 6 years ago

Thank you so much @christophrumpel 👍 but this could be useful for anyone, should add it to the documentation of botman because searching payload on the documentation doesn't show anything 😢

christophrumpel commented 6 years ago

Yeah you're right. I will add it 👍