@@ -188,21 +188,6 @@ public function sendPhoto($chat_id, $photo, $caption = '', $params = []){
188188 ], $ params ));
189189 }
190190
191- /**
192- * @param $chat_id
193- * @param $video
194- * @param string $caption
195- * @param array $params
196- * @return bool|string
197- */
198- public function sendVideo ($ chat_id , $ video , $ caption = '' , $ params = []){
199- return $ this ->bot ('sendVideo ' , array_merge ([
200- 'chat_id ' =>$ chat_id ,
201- 'video ' => $ video ,
202- 'caption ' =>$ caption
203- ], $ params ));
204- }
205-
206191 /**
207192 * @param $chat_id
208193 * @param $document
@@ -213,21 +198,11 @@ public function sendVideo($chat_id, $video, $caption = '', $params = []){
213198 public function sendDocument ($ chat_id , $ document , $ caption = '' , $ params = []){
214199 return $ this ->bot ('sendDocument ' , array_merge ([
215200 'chat_id ' =>$ chat_id ,
216- 'document ' => $ document ,
201+ 'Document ' => $ document ,
217202 'caption ' =>$ caption
218203 ], $ params ));
219204 }
220205
221- /**
222- * @param $chat_id
223- * @param array $params
224- * @return bool|string
225- */
226- public function getUserProfilePhotos ($ chat_id , $ params = []){
227- return $ this ->bot ('getUserProfilePhotos ' , array_merge ([
228- 'chat_id ' =>$ chat_id ,
229- ], $ params ));
230- }
231206
232207 /**
233208 * @param $chat_id
@@ -239,20 +214,11 @@ public function getUserProfilePhotos($chat_id, $params = []){
239214 public function sendAudio ($ chat_id , $ audio , $ caption = '' , $ params = []){
240215 return $ this ->bot ('sendAudio ' , array_merge ([
241216 'chat_id ' =>$ chat_id ,
242- 'audio ' => $ audio ,
217+ 'photo ' => $ audio ,
243218 'caption ' =>$ caption
244219 ], $ params ));
245220 }
246221
247- // answerInlineQuery
248-
249- public function answerInlineQuery ($ inline_query_id , $ audio , $ results , $ params = []){
250- return $ this ->bot ('answerInlineQuery ' , array_merge ([
251- 'inline_query_id ' =>$ inline_query_id ,
252- 'is_personal ' => true ,
253- 'results ' =>$ caption
254- ], $ params ));
255- }
256222 /**
257223 * @param $id
258224 * @param $action
@@ -280,6 +246,17 @@ public function sendContact($chat_id, $phone_number, $first_name, $params = []){
280246 ], $ params ));
281247 }
282248
249+ public function answerInlineQuery ($ inline_id , $ audio_url , $ title , $ params = []){
250+ return $ this ->bot ('answerInlineQuery ' ,[
251+ 'inline_query_id ' => $ inline_id ,
252+ 'results ' =>array_merge ([
253+ 'type ' =>'audio ' ,
254+ 'audio_url ' =>$ audio_url ,
255+ 'title ' =>$ title
256+ ],$ params )
257+ ]);
258+ }
259+
283260}
284261
285262
0 commit comments