Added functions. Support for photos forward
This commit is contained in:
parent
36337b3f37
commit
3c4ab2e0c9
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
require_once('config.php');
|
||||
require_once('shared.php');
|
||||
require_once('functions.php');
|
||||
|
||||
if (DEBUG) botlog("\n\n\n".'[II] Scheduler starting at ' . date('Y-m-d H:i:s') . ' ====================' . "\n\n");
|
||||
|
||||
|
|
19
shared.php
19
shared.php
|
@ -90,7 +90,7 @@
|
|||
$disable_web_page_preview = false,
|
||||
$reply_markup = null) {
|
||||
|
||||
$query = API_URL . API_TOKEN . "/forwardMessage?" .
|
||||
$query = API_URL . API_TOKEN . "/editMessageText?" .
|
||||
"chat_id=".urlencode($chat_id) .
|
||||
"&message_id=" . urlencode($message_id).
|
||||
"&text=" . urlencode($text);
|
||||
|
@ -115,6 +115,23 @@
|
|||
return $answer;
|
||||
}
|
||||
|
||||
function sendPhoto ($chat_id, $photo,
|
||||
$caption = null,
|
||||
$reply_markup = null,
|
||||
$disable_notification = false,
|
||||
$reply_to_message_id = null ) {
|
||||
|
||||
$query = API_URL . API_TOKEN . "/sendPhoto?" .
|
||||
"chat_id=".urlencode($chat_id) .
|
||||
"&photo=" . urlencode($photo);
|
||||
|
||||
$query .= "&disable_notification=$disable_notification";
|
||||
if ($reply_to_message_id != null) $query .= "&reply_to_message_id=$disable_web_page_preview";
|
||||
if ($reply_markup != null) $query .= "&reply_markup=$reply_markup";
|
||||
if ($caption != null) $query .= "&caption=$caption";
|
||||
|
||||
$answer = file_get_contents($query);
|
||||
}
|
||||
|
||||
// Makes the calendar inline keyboard
|
||||
function getCalendarTab ($month, $year) {
|
||||
|
|
Loading…
Reference in New Issue