@@ -7,7 +7,7 @@ class telegramBot
77 const BASE_URL = 'https://api.telegram.org ' ;
88 const BOT_URL = '/bot ' ;
99 const FILE_URL = '/file ' ;
10-
10+
1111 protected $ token ;
1212
1313 public function __construct ($ token )
@@ -224,7 +224,7 @@ public function sendVoice($chat_id, $audio, $duration = null, $reply_to_message_
224224 {
225225 $ data = compact ('chat_id ' , 'audio ' , 'duration ' , 'reply_to_message_id ' , 'reply_markup ' );
226226
227- if (((!is_dir ($ video )) && (filter_var ($ video , FILTER_VALIDATE_URL ) === FALSE )))
227+ if (((!is_dir ($ audio )) && (filter_var ($ audio , FILTER_VALIDATE_URL ) === FALSE )))
228228 return $ this ->sendRequest ('sendVoice ' , $ data );
229229
230230 return $ this ->uploadFile ('sendVoice ' , $ data );
@@ -272,7 +272,7 @@ public function sendVenue($chat_id, $latitude, $longitude, $title, $address, $fo
272272
273273 return $ this ->sendRequest ('sendVenue ' , $ params );
274274 }
275-
275+
276276 /**
277277 * Send Contact.
278278 *
@@ -294,7 +294,7 @@ public function sendContact($chat_id, $phone_number, $first_name, $last_name = n
294294
295295 return $ this ->sendRequest ('sendContact ' , $ params );
296296 }
297-
297+
298298 /**
299299 * Send Chat Action.
300300 *
@@ -357,23 +357,23 @@ public function getFile($file_id)
357357 {
358358 return $ this ->sendRequest ('getFile ' , compact ('file_id ' ));
359359 }
360-
360+
361361 /**
362362 * Use this method to get file Data.
363363 *
364364 * @link https://core.telegram.org/bots/api#getfile
365- *
365+ *
366366 * @see getFile
367367 *
368368 * @param string $file_id
369- * @param string $file_path Is taken from the getFile response
369+ * @param string $file_path Is taken from the getFile response
370370 *
371371 * @return On success, a File Data is returned
372372 */
373373 public function getFileData ($ file_id , $ file_path )
374374 {
375- return file_get_contents ($ this ->baseFileURL . $ file_path . '? ' . http_build_query (compact ('file_id ' )));
376- }
375+ return file_get_contents ($ this ->baseFileURL . $ file_path . '? ' . http_build_query (compact ('file_id ' )));
376+ }
377377
378378 /**
379379 * Set a Webhook to receive incoming updates via an outgoing webhook.
0 commit comments