Skip to content

Commit

Permalink
sendAudio method updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mgp25 committed Aug 21, 2015
1 parent 42231b5 commit 2e9673a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,19 @@ public function sendPhoto($chat_id, $photo, $caption = null, $reply_to_message_i
*
* @link https://core.telegram.org/bots/api#sendaudio
*
* @param int $chat_id
* @param string $audio
* @param int $reply_to_message_id
* @param KeyboardMarkup $reply_markup
* @param int $chat_id
* @param string $audio
* @param int $duration
* @param string $performer
* @param string $title
* @param int $reply_to_message_id
* @param KeyboardMarkup $reply_markup
*
* @return Array
*/
public function sendAudio($chat_id, $audio, $reply_to_message_id = null, $replyMarkup = null)
public function sendAudio($chat_id, $audio, $duration = null, $performer = null, $title = null, $reply_to_message_id = null, $reply_markup = null)
{
$data = compact('chat_id', 'audio', 'reply_to_message_id', 'reply_markup');
$data = compact('chat_id', 'audio', 'duration', 'performer', 'title', 'reply_to_message_id', 'reply_markup');

if (((!is_dir($audio)) && (filter_var($audio, FILTER_VALIDATE_URL) === FALSE)))
return $this->sendRequest('sendAudio', $data);
Expand Down

0 comments on commit 2e9673a

Please sign in to comment.