Skip to content

Commit

Permalink
typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mgp25 committed Feb 15, 2017
1 parent e335483 commit b3e4140
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Telegram.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class telegramBot
const BASE_URL = 'https://api.telegram.org';
const BOT_URL = '/bot';
const FILE_URL = '/file';

protected $token;

public function __construct($token)
Expand Down Expand Up @@ -224,7 +224,7 @@ public function sendVoice($chat_id, $audio, $duration = null, $reply_to_message_
{
$data = compact('chat_id', 'audio', 'duration', 'reply_to_message_id', 'reply_markup');

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

return $this->uploadFile('sendVoice', $data);
Expand Down Expand Up @@ -272,7 +272,7 @@ public function sendVenue($chat_id, $latitude, $longitude, $title, $address, $fo

return $this->sendRequest('sendVenue', $params);
}

/**
* Send Contact.
*
Expand All @@ -294,7 +294,7 @@ public function sendContact($chat_id, $phone_number, $first_name, $last_name = n

return $this->sendRequest('sendContact', $params);
}

/**
* Send Chat Action.
*
Expand Down Expand Up @@ -357,23 +357,23 @@ public function getFile($file_id)
{
return $this->sendRequest('getFile', compact('file_id'));
}

/**
* Use this method to get file Data.
*
* @link https://core.telegram.org/bots/api#getfile
*
*
* @see getFile
*
* @param string $file_id
* @param string $file_path Is taken from the getFile response
* @param string $file_path Is taken from the getFile response
*
* @return On success, a File Data is returned
*/
public function getFileData($file_id, $file_path)
{
return file_get_contents($this->baseFileURL . $file_path . '?' . http_build_query(compact('file_id')));
}
return file_get_contents($this->baseFileURL . $file_path . '?' . http_build_query(compact('file_id')));
}

/**
* Set a Webhook to receive incoming updates via an outgoing webhook.
Expand Down

0 comments on commit b3e4140

Please sign in to comment.