Commit 7c3b0b3a authored by MBoretto's avatar MBoretto

updating doc

parent 19048f8f
......@@ -212,6 +212,13 @@ All types implemented according to Telegram API (2015 November).
### Methods
All methods implemented according to Telegram API (2015 November).
####Send Message
Message longer than 4096 characters are splitted in more message.
```php
$result = Request::sendMessage(['chat_id' => $chat_id, 'text' => 'Your utf8 text 😜 ...']);
```
####Send Photo
To send a local photo provide the file path as second param:
......
......@@ -151,8 +151,12 @@ class DB
*
* @return string
*/
protected static function toTimestamp($time)
protected static function getTimestamp($time = null)
{
if (is_null($time)) {
$time = time();
}
return date('Y-m-d H:i:s', $time);
}
......@@ -239,9 +243,9 @@ class DB
$chat_id = $chat->getId();
$date = self::toTimestamp($message->getDate());
$date = self::getTimestamp($message->getDate());
$forward_from = $message->getForwardFrom();
$forward_date = self::toTimestamp($message->getForwardDate());
$forward_date = self::getTimestamp($message->getForwardDate());
$photo = $message->getPhoto();
$new_chat_participant = $message->getNewChatParticipant();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment