@@ -207,94 +207,94 @@ discard block |
||
207 | 207 | ]; |
208 | 208 | |
209 | 209 | private const METHODS_KEYS = [ |
210 | - 'getUpdates' => ['offset','limit','timeout','allowed_updates','token','return_array','forgot','answer'], |
|
211 | - 'setWebhook' => ['url','certificate','ip_address','max_connections','allowed_updates','drop_pending_updates','secret_token','token','return_array','forgot','answer'], |
|
212 | - 'deleteWebhook' => ['drop_pending_updates','token','return_array','forgot','answer'], |
|
213 | - 'getWebhookInfo' => ['token','return_array','forgot','answer'], |
|
214 | - 'getMe' => ['token','return_array','forgot','answer'], |
|
215 | - 'logOut' => ['token','return_array','forgot','answer'], |
|
216 | - 'close' => ['token','return_array','forgot','answer'], |
|
217 | - 'sendMessage' => ['text','chat_id','parse_mode','entities','disable_web_page_preview','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
218 | - 'forwardMessage' => ['chat_id','from_chat_id','disable_notification','protect_content','message_id','token','return_array','forgot','answer'], |
|
219 | - 'copyMessage' => ['chat_id','from_chat_id','message_id','caption','parse_mode','caption_entities','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
220 | - 'sendPhoto' => ['photo','chat_id','caption','parse_mode','caption_entities','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
221 | - 'sendAudio' => ['audio','chat_id','caption','parse_mode','caption_entities','duration','performer','title','thumb','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
222 | - 'sendDocument' => ['document','chat_id','thumb','caption','parse_mode','caption_entities','disable_content_type_detection','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
223 | - 'sendVideo' => ['video','chat_id','duration','width','height','thumb','caption','parse_mode','caption_entities','supports_streaming','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
224 | - 'sendAnimation' => ['animation','chat_id','duration','width','height','thumb','caption','parse_mode','caption_entities','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
225 | - 'sendVoice' => ['voice','chat_id','caption','parse_mode','caption_entities','duration','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
226 | - 'sendVideoNote' => ['video_note','chat_id','duration','length','thumb','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
227 | - 'sendMediaGroup' => ['media','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','token','return_array','forgot','answer'], |
|
228 | - 'sendLocation' => ['latitude','longitude','chat_id','horizontal_accuracy','live_period','heading','proximity_alert_radius','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
229 | - 'editMessageLiveLocation' => ['latitude','longitude','chat_id','message_id','inline_message_id','horizontal_accuracy','heading','proximity_alert_radius','reply_markup','token','return_array','forgot','answer'], |
|
230 | - 'stopMessageLiveLocation' => ['chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'], |
|
231 | - 'sendVenue' => ['chat_id','latitude','longitude','title','address','foursquare_id','foursquare_type','google_place_id','google_place_type','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
232 | - 'sendContact' => ['phone_number','first_name','chat_id','last_name','vcard','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
233 | - 'sendPoll' => ['question','options','chat_id','is_anonymous','type','allows_multiple_answers','correct_option_id','explanation','explanation_parse_mode','explanation_entities','open_period','close_date','is_closed','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
234 | - 'sendDice' => ['chat_id','emoji','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
235 | - 'sendChatAction' => ['chat_id','action','token','return_array','forgot','answer'], |
|
236 | - 'getUserProfilePhotos' => ['user_id','offset','limit','token','return_array','forgot','answer'], |
|
237 | - 'getFile' => ['file_id','token','return_array','forgot','answer'], |
|
238 | - 'banChatMember' => ['chat_id','user_id','until_date','revoke_messages','token','return_array','forgot','answer'], |
|
239 | - 'unbanChatMember' => ['chat_id','user_id','only_if_banned','token','return_array','forgot','answer'], |
|
240 | - 'restrictChatMember' => ['permissions','chat_id','user_id','until_date','token','return_array','forgot','answer'], |
|
241 | - 'promoteChatMember' => ['chat_id','user_id','is_anonymous','can_manage_chat','can_post_messages','can_edit_messages','can_delete_messages','can_manage_video_chats','can_restrict_members','can_promote_members','can_change_info','can_invite_users','can_pin_messages','token','return_array','forgot','answer'], |
|
242 | - 'setChatAdministratorCustomTitle' => ['custom_title','chat_id','user_id','token','return_array','forgot','answer'], |
|
243 | - 'banChatSenderChat' => ['sender_chat_id','chat_id','token','return_array','forgot','answer'], |
|
244 | - 'unbanChatSenderChat' => ['sender_chat_id','chat_id','token','return_array','forgot','answer'], |
|
245 | - 'setChatPermissions' => ['permissions','chat_id','token','return_array','forgot','answer'], |
|
246 | - 'exportChatInviteLink' => ['chat_id','token','return_array','forgot','answer'], |
|
247 | - 'createChatInviteLink' => ['chat_id','name','expire_date','member_limit','creates_join_request','token','return_array','forgot','answer'], |
|
248 | - 'editChatInviteLink' => ['invite_link','chat_id','name','expire_date','member_limit','creates_join_request','token','return_array','forgot','answer'], |
|
249 | - 'revokeChatInviteLink' => ['invite_link','chat_id','token','return_array','forgot','answer'], |
|
250 | - 'approveChatJoinRequest' => ['chat_id','user_id','token','return_array','forgot','answer'], |
|
251 | - 'declineChatJoinRequest' => ['chat_id','user_id','token','return_array','forgot','answer'], |
|
252 | - 'setChatPhoto' => ['photo','chat_id','token','return_array','forgot','answer'], |
|
253 | - 'deleteChatPhoto' => ['chat_id','token','return_array','forgot','answer'], |
|
254 | - 'setChatTitle' => ['title','chat_id','token','return_array','forgot','answer'], |
|
255 | - 'setChatDescription' => ['chat_id','description','token','return_array','forgot','answer'], |
|
256 | - 'pinChatMessage' => ['message_id','chat_id','disable_notification','token','return_array','forgot','answer'], |
|
257 | - 'unpinChatMessage' => ['chat_id','message_id','token','return_array','forgot','answer'], |
|
258 | - 'unpinAllChatMessages' => ['chat_id','token','return_array','forgot','answer'], |
|
259 | - 'leaveChat' => ['chat_id','token','return_array','forgot','answer'], |
|
260 | - 'getChat' => ['chat_id','token','return_array','forgot','answer'], |
|
261 | - 'getChatAdministrators' => ['chat_id','token','return_array','forgot','answer'], |
|
262 | - 'getChatMemberCount' => ['chat_id','token','return_array','forgot','answer'], |
|
263 | - 'getChatMember' => ['chat_id','user_id','token','return_array','forgot','answer'], |
|
264 | - 'setChatStickerSet' => ['sticker_set_name','chat_id','token','return_array','forgot','answer'], |
|
265 | - 'deleteChatStickerSet' => ['chat_id','token','return_array','forgot','answer'], |
|
266 | - 'answerCallbackQuery' => ['callback_query_id','text','show_alert','url','cache_time','token','return_array','forgot','answer'], |
|
267 | - 'setMyCommands' => ['commands','scope','language_code','token','return_array','forgot','answer'], |
|
268 | - 'deleteMyCommands' => ['scope','language_code','token','return_array','forgot','answer'], |
|
269 | - 'getMyCommands' => ['scope','language_code','token','return_array','forgot','answer'], |
|
270 | - 'setChatMenuButton' => ['chat_id','menu_button','token','return_array','forgot','answer'], |
|
271 | - 'getChatMenuButton' => ['chat_id','token','return_array','forgot','answer'], |
|
272 | - 'setMyDefaultAdministratorRights' => ['rights','for_channels','token','return_array','forgot','answer'], |
|
273 | - 'getMyDefaultAdministratorRights' => ['for_channels','token','return_array','forgot','answer'], |
|
274 | - 'editMessageText' => ['text','chat_id','message_id','inline_message_id','parse_mode','entities','disable_web_page_preview','reply_markup','token','return_array','forgot','answer'], |
|
275 | - 'editMessageCaption' => ['chat_id','message_id','inline_message_id','caption','parse_mode','caption_entities','reply_markup','token','return_array','forgot','answer'], |
|
276 | - 'editMessageMedia' => ['media','chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'], |
|
277 | - 'editMessageReplyMarkup' => ['chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'], |
|
278 | - 'stopPoll' => ['chat_id','message_id','reply_markup','token','return_array','forgot','answer'], |
|
279 | - 'deleteMessage' => ['chat_id','message_id','token','return_array','forgot','answer'], |
|
280 | - 'sendSticker' => ['sticker','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
281 | - 'getStickerSet' => ['name','token','return_array','forgot','answer'], |
|
282 | - 'uploadStickerFile' => ['png_sticker','user_id','token','return_array','forgot','answer'], |
|
283 | - 'createNewStickerSet' => ['name','title','emojis','user_id','png_sticker','tgs_sticker','webm_sticker','contains_masks','mask_position','token','return_array','forgot','answer'], |
|
284 | - 'addStickerToSet' => ['name','emojis','user_id','png_sticker','tgs_sticker','webm_sticker','mask_position','token','return_array','forgot','answer'], |
|
285 | - 'setStickerPositionInSet' => ['sticker','position','token','return_array','forgot','answer'], |
|
286 | - 'deleteStickerFromSet' => ['sticker','token','return_array','forgot','answer'], |
|
287 | - 'setStickerSetThumb' => ['name','user_id','thumb','token','return_array','forgot','answer'], |
|
288 | - 'answerInlineQuery' => ['results','inline_query_id','cache_time','is_personal','next_offset','switch_pm_text','switch_pm_parameter','token','return_array','forgot','answer'], |
|
289 | - 'answerWebAppQuery' => ['web_app_query_id','result','token','return_array','forgot','answer'], |
|
290 | - 'sendInvoice' => ['title','description','payload','provider_token','currency','prices','chat_id','max_tip_amount','suggested_tip_amounts','start_parameter','provider_data','photo_url','photo_size','photo_width','photo_height','need_name','need_phone_number','need_email','need_shipping_address','send_phone_number_to_provider','send_email_to_provider','is_flexible','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
291 | - 'createInvoiceLink' => ['title','description','payload','provider_token','currency','prices','max_tip_amount','suggested_tip_amounts','provider_data','photo_url','photo_size','photo_width','photo_height','need_name','need_phone_number','need_email','need_shipping_address','send_phone_number_to_provider','send_email_to_provider','is_flexible','token','return_array','forgot','answer'], |
|
292 | - 'answerShippingQuery' => ['ok','shipping_query_id','shipping_options','error_message','token','return_array','forgot','answer'], |
|
293 | - 'answerPreCheckoutQuery' => ['ok','pre_checkout_query_id','error_message','token','return_array','forgot','answer'], |
|
294 | - 'setPassportDataErrors' => ['errors','user_id','token','return_array','forgot','answer'], |
|
295 | - 'sendGame' => ['game_short_name','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
296 | - 'setGameScore' => ['score','user_id','force','disable_edit_message','chat_id','message_id','inline_message_id','token','return_array','forgot','answer'], |
|
297 | - 'getGameHighScores' => ['user_id','chat_id','message_id','inline_message_id','token','return_array','forgot','answer'], |
|
210 | + 'getUpdates' => ['offset', 'limit', 'timeout', 'allowed_updates', 'token', 'return_array', 'forgot', 'answer'], |
|
211 | + 'setWebhook' => ['url', 'certificate', 'ip_address', 'max_connections', 'allowed_updates', 'drop_pending_updates', 'secret_token', 'token', 'return_array', 'forgot', 'answer'], |
|
212 | + 'deleteWebhook' => ['drop_pending_updates', 'token', 'return_array', 'forgot', 'answer'], |
|
213 | + 'getWebhookInfo' => ['token', 'return_array', 'forgot', 'answer'], |
|
214 | + 'getMe' => ['token', 'return_array', 'forgot', 'answer'], |
|
215 | + 'logOut' => ['token', 'return_array', 'forgot', 'answer'], |
|
216 | + 'close' => ['token', 'return_array', 'forgot', 'answer'], |
|
217 | + 'sendMessage' => ['text', 'chat_id', 'parse_mode', 'entities', 'disable_web_page_preview', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
218 | + 'forwardMessage' => ['chat_id', 'from_chat_id', 'disable_notification', 'protect_content', 'message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
219 | + 'copyMessage' => ['chat_id', 'from_chat_id', 'message_id', 'caption', 'parse_mode', 'caption_entities', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
220 | + 'sendPhoto' => ['photo', 'chat_id', 'caption', 'parse_mode', 'caption_entities', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
221 | + 'sendAudio' => ['audio', 'chat_id', 'caption', 'parse_mode', 'caption_entities', 'duration', 'performer', 'title', 'thumb', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
222 | + 'sendDocument' => ['document', 'chat_id', 'thumb', 'caption', 'parse_mode', 'caption_entities', 'disable_content_type_detection', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
223 | + 'sendVideo' => ['video', 'chat_id', 'duration', 'width', 'height', 'thumb', 'caption', 'parse_mode', 'caption_entities', 'supports_streaming', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
224 | + 'sendAnimation' => ['animation', 'chat_id', 'duration', 'width', 'height', 'thumb', 'caption', 'parse_mode', 'caption_entities', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
225 | + 'sendVoice' => ['voice', 'chat_id', 'caption', 'parse_mode', 'caption_entities', 'duration', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
226 | + 'sendVideoNote' => ['video_note', 'chat_id', 'duration', 'length', 'thumb', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
227 | + 'sendMediaGroup' => ['media', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'token', 'return_array', 'forgot', 'answer'], |
|
228 | + 'sendLocation' => ['latitude', 'longitude', 'chat_id', 'horizontal_accuracy', 'live_period', 'heading', 'proximity_alert_radius', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
229 | + 'editMessageLiveLocation' => ['latitude', 'longitude', 'chat_id', 'message_id', 'inline_message_id', 'horizontal_accuracy', 'heading', 'proximity_alert_radius', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
230 | + 'stopMessageLiveLocation' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
231 | + 'sendVenue' => ['chat_id', 'latitude', 'longitude', 'title', 'address', 'foursquare_id', 'foursquare_type', 'google_place_id', 'google_place_type', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
232 | + 'sendContact' => ['phone_number', 'first_name', 'chat_id', 'last_name', 'vcard', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
233 | + 'sendPoll' => ['question', 'options', 'chat_id', 'is_anonymous', 'type', 'allows_multiple_answers', 'correct_option_id', 'explanation', 'explanation_parse_mode', 'explanation_entities', 'open_period', 'close_date', 'is_closed', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
234 | + 'sendDice' => ['chat_id', 'emoji', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
235 | + 'sendChatAction' => ['chat_id', 'action', 'token', 'return_array', 'forgot', 'answer'], |
|
236 | + 'getUserProfilePhotos' => ['user_id', 'offset', 'limit', 'token', 'return_array', 'forgot', 'answer'], |
|
237 | + 'getFile' => ['file_id', 'token', 'return_array', 'forgot', 'answer'], |
|
238 | + 'banChatMember' => ['chat_id', 'user_id', 'until_date', 'revoke_messages', 'token', 'return_array', 'forgot', 'answer'], |
|
239 | + 'unbanChatMember' => ['chat_id', 'user_id', 'only_if_banned', 'token', 'return_array', 'forgot', 'answer'], |
|
240 | + 'restrictChatMember' => ['permissions', 'chat_id', 'user_id', 'until_date', 'token', 'return_array', 'forgot', 'answer'], |
|
241 | + 'promoteChatMember' => ['chat_id', 'user_id', 'is_anonymous', 'can_manage_chat', 'can_post_messages', 'can_edit_messages', 'can_delete_messages', 'can_manage_video_chats', 'can_restrict_members', 'can_promote_members', 'can_change_info', 'can_invite_users', 'can_pin_messages', 'token', 'return_array', 'forgot', 'answer'], |
|
242 | + 'setChatAdministratorCustomTitle' => ['custom_title', 'chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
243 | + 'banChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
244 | + 'unbanChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
245 | + 'setChatPermissions' => ['permissions', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
246 | + 'exportChatInviteLink' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
247 | + 'createChatInviteLink' => ['chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'return_array', 'forgot', 'answer'], |
|
248 | + 'editChatInviteLink' => ['invite_link', 'chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'return_array', 'forgot', 'answer'], |
|
249 | + 'revokeChatInviteLink' => ['invite_link', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
250 | + 'approveChatJoinRequest' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
251 | + 'declineChatJoinRequest' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
252 | + 'setChatPhoto' => ['photo', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
253 | + 'deleteChatPhoto' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
254 | + 'setChatTitle' => ['title', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
255 | + 'setChatDescription' => ['chat_id', 'description', 'token', 'return_array', 'forgot', 'answer'], |
|
256 | + 'pinChatMessage' => ['message_id', 'chat_id', 'disable_notification', 'token', 'return_array', 'forgot', 'answer'], |
|
257 | + 'unpinChatMessage' => ['chat_id', 'message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
258 | + 'unpinAllChatMessages' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
259 | + 'leaveChat' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
260 | + 'getChat' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
261 | + 'getChatAdministrators' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
262 | + 'getChatMemberCount' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
263 | + 'getChatMember' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
264 | + 'setChatStickerSet' => ['sticker_set_name', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
265 | + 'deleteChatStickerSet' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
266 | + 'answerCallbackQuery' => ['callback_query_id', 'text', 'show_alert', 'url', 'cache_time', 'token', 'return_array', 'forgot', 'answer'], |
|
267 | + 'setMyCommands' => ['commands', 'scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'], |
|
268 | + 'deleteMyCommands' => ['scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'], |
|
269 | + 'getMyCommands' => ['scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'], |
|
270 | + 'setChatMenuButton' => ['chat_id', 'menu_button', 'token', 'return_array', 'forgot', 'answer'], |
|
271 | + 'getChatMenuButton' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
272 | + 'setMyDefaultAdministratorRights' => ['rights', 'for_channels', 'token', 'return_array', 'forgot', 'answer'], |
|
273 | + 'getMyDefaultAdministratorRights' => ['for_channels', 'token', 'return_array', 'forgot', 'answer'], |
|
274 | + 'editMessageText' => ['text', 'chat_id', 'message_id', 'inline_message_id', 'parse_mode', 'entities', 'disable_web_page_preview', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
275 | + 'editMessageCaption' => ['chat_id', 'message_id', 'inline_message_id', 'caption', 'parse_mode', 'caption_entities', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
276 | + 'editMessageMedia' => ['media', 'chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
277 | + 'editMessageReplyMarkup' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
278 | + 'stopPoll' => ['chat_id', 'message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
279 | + 'deleteMessage' => ['chat_id', 'message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
280 | + 'sendSticker' => ['sticker', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
281 | + 'getStickerSet' => ['name', 'token', 'return_array', 'forgot', 'answer'], |
|
282 | + 'uploadStickerFile' => ['png_sticker', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
283 | + 'createNewStickerSet' => ['name', 'title', 'emojis', 'user_id', 'png_sticker', 'tgs_sticker', 'webm_sticker', 'contains_masks', 'mask_position', 'token', 'return_array', 'forgot', 'answer'], |
|
284 | + 'addStickerToSet' => ['name', 'emojis', 'user_id', 'png_sticker', 'tgs_sticker', 'webm_sticker', 'mask_position', 'token', 'return_array', 'forgot', 'answer'], |
|
285 | + 'setStickerPositionInSet' => ['sticker', 'position', 'token', 'return_array', 'forgot', 'answer'], |
|
286 | + 'deleteStickerFromSet' => ['sticker', 'token', 'return_array', 'forgot', 'answer'], |
|
287 | + 'setStickerSetThumb' => ['name', 'user_id', 'thumb', 'token', 'return_array', 'forgot', 'answer'], |
|
288 | + 'answerInlineQuery' => ['results', 'inline_query_id', 'cache_time', 'is_personal', 'next_offset', 'switch_pm_text', 'switch_pm_parameter', 'token', 'return_array', 'forgot', 'answer'], |
|
289 | + 'answerWebAppQuery' => ['web_app_query_id', 'result', 'token', 'return_array', 'forgot', 'answer'], |
|
290 | + 'sendInvoice' => ['title', 'description', 'payload', 'provider_token', 'currency', 'prices', 'chat_id', 'max_tip_amount', 'suggested_tip_amounts', 'start_parameter', 'provider_data', 'photo_url', 'photo_size', 'photo_width', 'photo_height', 'need_name', 'need_phone_number', 'need_email', 'need_shipping_address', 'send_phone_number_to_provider', 'send_email_to_provider', 'is_flexible', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
291 | + 'createInvoiceLink' => ['title', 'description', 'payload', 'provider_token', 'currency', 'prices', 'max_tip_amount', 'suggested_tip_amounts', 'provider_data', 'photo_url', 'photo_size', 'photo_width', 'photo_height', 'need_name', 'need_phone_number', 'need_email', 'need_shipping_address', 'send_phone_number_to_provider', 'send_email_to_provider', 'is_flexible', 'token', 'return_array', 'forgot', 'answer'], |
|
292 | + 'answerShippingQuery' => ['ok', 'shipping_query_id', 'shipping_options', 'error_message', 'token', 'return_array', 'forgot', 'answer'], |
|
293 | + 'answerPreCheckoutQuery' => ['ok', 'pre_checkout_query_id', 'error_message', 'token', 'return_array', 'forgot', 'answer'], |
|
294 | + 'setPassportDataErrors' => ['errors', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
295 | + 'sendGame' => ['game_short_name', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
296 | + 'setGameScore' => ['score', 'user_id', 'force', 'disable_edit_message', 'chat_id', 'message_id', 'inline_message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
297 | + 'getGameHighScores' => ['user_id', 'chat_id', 'message_id', 'inline_message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
298 | 298 | ]; |
299 | 299 | |
300 | 300 | private const METHODS_WITH_FILE = [ |
@@ -315,18 +315,18 @@ discard block |
||
315 | 315 | ]; |
316 | 316 | |
317 | 317 | |
318 | - public static function __callStatic (string $name, array $arguments) { |
|
318 | + public static function __callStatic(string $name, array $arguments) { |
|
319 | 319 | if ($action = self::methodAction($name)) { |
320 | - self::keysName($action,$arguments); |
|
321 | - self::readyFile($action,$arguments); |
|
320 | + self::keysName($action, $arguments); |
|
321 | + self::readyFile($action, $arguments); |
|
322 | 322 | print_r($arguments); |
323 | 323 | } |
324 | 324 | else { |
325 | - logger::write("$name method is not supported",'error'); |
|
325 | + logger::write("$name method is not supported", 'error'); |
|
326 | 326 | } |
327 | 327 | } |
328 | 328 | |
329 | - private static function keysName (string $name, array &$arguments) { |
|
329 | + private static function keysName(string $name, array &$arguments) { |
|
330 | 330 | foreach ($arguments as $key => $argument) { |
331 | 331 | if (is_numeric($key) && isset(self::METHODS_KEYS[$name][$key])) { |
332 | 332 | $arguments[self::METHODS_KEYS[$name][$key]] = $argument; |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | - private static function methodAction(string $name): string|false { |
|
338 | + private static function methodAction(string $name): string | false { |
|
339 | 339 | return self::METHODS_ACTION[strtolower($name)] ?? false; |
340 | 340 | } |
341 | 341 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | } |
357 | 357 | } |
358 | 358 | |
359 | - private static function methodFile(string $name): array|false { |
|
359 | + private static function methodFile(string $name): array | false { |
|
360 | 360 | return self::METHODS_WITH_FILE[$name] ?? false; |
361 | 361 | } |
362 | 362 | } |
363 | 363 | \ No newline at end of file |