3 require_once 'Call.php';
4 class Net_Telegram_SendMessage extends Net_Telegram_Call {
6 var $chat_id; // the user id... or channel name ?
8 var $parse_mode; // HTML|Markdown|MarkdownV2
9 var $entities; // array of entitiels
10 var $disable_web_page_preview; ///??
11 var $reply_to_message_id;
12 var $allow_sending_without_reply; // if you are using reply_to and do not want to validate it...
13 var $reply_markup; // markup keyboards?!?!
19 function __construct($tg, $o=false)
23 parent::__construct($tg, $o);
24 if (!empty($this->text)) {
25 $this->text = str_replace(array(
26 '\\', '_', '*', '[', ']', '(', ')', '~', '`', '>',
27 '<', '&', '#', '+', '-', '=', '|', '{', '}', '.', '!'
29 '\\\\', '\\_', '\\*', '\\[', '\\]', '\\(', '\\)', '\\~', '\\`', '\\>',
30 '\\<', '\\&', '\\#', '\\+', '\\-', '\\=', '\\|', '\\{', '\\}', '\\.', '\\!'
41 $res = parent::send();
43 return $this->_telegram->factory('Message',$res);