Closed iSunilSV closed 9 years ago
SendMessage
have 4 additional properties, not mentioned in constructor, because all of them are optional. Adding all optional properties in all request types will create a mess. Why you think ReplyMarkup
is more important than others?
BTW, you can assign properties when constructing object in this way:
var req = new SendMessage(<someid>, <sometext>) { ReplyMarkup = <customKeyboard> };
ReplyMarkUp actually becomes a part of the message when someone sends a message. I don't see it as a property. Hence, suggested the change.
All four properties are equally important from time to time (ParseMode
, DisableWebPagePreview
, ReplyToMessageId
, ReplyMarkup
), but they are not required to be always presented. So, they are only optional properties, while Text
property is always required (you can't send message without text), thus text
is also a parameter in constructor.
So, unless you have strong reason for not using property, I prefer do not pollute constructors with optional parameters.
I don't have any other reason.
Added another constructor in SendMessage, which enables the user to send keyboard as reply