TelegramBots / Telegram.Bot

.NET Client for Telegram Bot API
https://telegrambots.github.io/book
MIT License
3.17k stars 686 forks source link

Telegram.Bot.Types.Message.Date change to timestamp #816

Closed wuball closed 5 years ago

wuball commented 5 years ago

https://core.telegram.org/bots/api#message

https://github.com/TelegramBots/Telegram.Bot/blob/master/src/Telegram.Bot/Types/Message.cs

Telegram.Bot.Types.Message.Date must change to int.

MihaZupan commented 5 years ago

The value is read as an integer and converted into DateTime with the UnixDateTimeConverter, as DateTime is what can easily be used in c#.

If you need the timestamp, you can always convert the value back to an integer, but for the majority of users, a DateTime is desired here.