|
@@ -452,94 +452,94 @@ discard block |
|
|
block discarded – undo |
452
|
452
|
];
|
453
|
453
|
|
454
|
454
|
private const METHODS_KEYS = [
|
455
|
|
- 'getUpdates' => ['offset','limit','timeout','allowed_updates','token','return_array','forgot','answer'],
|
456
|
|
- 'setWebhook' => ['url','certificate','ip_address','max_connections','allowed_updates','drop_pending_updates','secret_token','token','return_array','forgot','answer'],
|
457
|
|
- 'deleteWebhook' => ['drop_pending_updates','token','return_array','forgot','answer'],
|
458
|
|
- 'getWebhookInfo' => ['token','return_array','forgot','answer'],
|
459
|
|
- 'getMe' => ['token','return_array','forgot','answer'],
|
460
|
|
- 'logOut' => ['token','return_array','forgot','answer'],
|
461
|
|
- 'close' => ['token','return_array','forgot','answer'],
|
462
|
|
- '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'],
|
463
|
|
- 'forwardMessage' => ['chat_id','from_chat_id','disable_notification','protect_content','message_id','token','return_array','forgot','answer'],
|
464
|
|
- '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'],
|
465
|
|
- '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'],
|
466
|
|
- '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'],
|
467
|
|
- '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'],
|
468
|
|
- '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'],
|
469
|
|
- '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'],
|
470
|
|
- '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'],
|
471
|
|
- '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'],
|
472
|
|
- 'sendMediaGroup' => ['media','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','token','return_array','forgot','answer'],
|
473
|
|
- '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'],
|
474
|
|
- 'editMessageLiveLocation' => ['latitude','longitude','chat_id','message_id','inline_message_id','horizontal_accuracy','heading','proximity_alert_radius','reply_markup','token','return_array','forgot','answer'],
|
475
|
|
- 'stopMessageLiveLocation' => ['chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'],
|
476
|
|
- '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'],
|
477
|
|
- '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'],
|
478
|
|
- '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'],
|
479
|
|
- 'sendDice' => ['chat_id','emoji','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'],
|
480
|
|
- 'sendChatAction' => ['chat_id','action','token','return_array','forgot','answer'],
|
481
|
|
- 'getUserProfilePhotos' => ['user_id','offset','limit','token','return_array','forgot','answer'],
|
482
|
|
- 'getFile' => ['file_id','token','return_array','forgot','answer'],
|
483
|
|
- 'banChatMember' => ['chat_id','user_id','until_date','revoke_messages','token','return_array','forgot','answer'],
|
484
|
|
- 'unbanChatMember' => ['chat_id','user_id','only_if_banned','token','return_array','forgot','answer'],
|
485
|
|
- 'restrictChatMember' => ['permissions','chat_id','user_id','until_date','token','return_array','forgot','answer'],
|
486
|
|
- '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'],
|
487
|
|
- 'setChatAdministratorCustomTitle' => ['custom_title','chat_id','user_id','token','return_array','forgot','answer'],
|
488
|
|
- 'banChatSenderChat' => ['sender_chat_id','chat_id','token','return_array','forgot','answer'],
|
489
|
|
- 'unbanChatSenderChat' => ['sender_chat_id','chat_id','token','return_array','forgot','answer'],
|
490
|
|
- 'setChatPermissions' => ['permissions','chat_id','token','return_array','forgot','answer'],
|
491
|
|
- 'exportChatInviteLink' => ['chat_id','token','return_array','forgot','answer'],
|
492
|
|
- 'createChatInviteLink' => ['chat_id','name','expire_date','member_limit','creates_join_request','token','return_array','forgot','answer'],
|
493
|
|
- 'editChatInviteLink' => ['invite_link','chat_id','name','expire_date','member_limit','creates_join_request','token','return_array','forgot','answer'],
|
494
|
|
- 'revokeChatInviteLink' => ['invite_link','chat_id','token','return_array','forgot','answer'],
|
495
|
|
- 'approveChatJoinRequest' => ['chat_id','user_id','token','return_array','forgot','answer'],
|
496
|
|
- 'declineChatJoinRequest' => ['chat_id','user_id','token','return_array','forgot','answer'],
|
497
|
|
- 'setChatPhoto' => ['photo','chat_id','token','return_array','forgot','answer'],
|
498
|
|
- 'deleteChatPhoto' => ['chat_id','token','return_array','forgot','answer'],
|
499
|
|
- 'setChatTitle' => ['title','chat_id','token','return_array','forgot','answer'],
|
500
|
|
- 'setChatDescription' => ['chat_id','description','token','return_array','forgot','answer'],
|
501
|
|
- 'pinChatMessage' => ['message_id','chat_id','disable_notification','token','return_array','forgot','answer'],
|
502
|
|
- 'unpinChatMessage' => ['chat_id','message_id','token','return_array','forgot','answer'],
|
503
|
|
- 'unpinAllChatMessages' => ['chat_id','token','return_array','forgot','answer'],
|
504
|
|
- 'leaveChat' => ['chat_id','token','return_array','forgot','answer'],
|
505
|
|
- 'getChat' => ['chat_id','token','return_array','forgot','answer'],
|
506
|
|
- 'getChatAdministrators' => ['chat_id','token','return_array','forgot','answer'],
|
507
|
|
- 'getChatMemberCount' => ['chat_id','token','return_array','forgot','answer'],
|
508
|
|
- 'getChatMember' => ['chat_id','user_id','token','return_array','forgot','answer'],
|
509
|
|
- 'setChatStickerSet' => ['sticker_set_name','chat_id','token','return_array','forgot','answer'],
|
510
|
|
- 'deleteChatStickerSet' => ['chat_id','token','return_array','forgot','answer'],
|
511
|
|
- 'answerCallbackQuery' => ['callback_query_id','text','show_alert','url','cache_time','token','return_array','forgot','answer'],
|
512
|
|
- 'setMyCommands' => ['commands','scope','language_code','token','return_array','forgot','answer'],
|
513
|
|
- 'deleteMyCommands' => ['scope','language_code','token','return_array','forgot','answer'],
|
514
|
|
- 'getMyCommands' => ['scope','language_code','token','return_array','forgot','answer'],
|
515
|
|
- 'setChatMenuButton' => ['chat_id','menu_button','token','return_array','forgot','answer'],
|
516
|
|
- 'getChatMenuButton' => ['chat_id','token','return_array','forgot','answer'],
|
517
|
|
- 'setMyDefaultAdministratorRights' => ['rights','for_channels','token','return_array','forgot','answer'],
|
518
|
|
- 'getMyDefaultAdministratorRights' => ['for_channels','token','return_array','forgot','answer'],
|
519
|
|
- 'editMessageText' => ['text','chat_id','message_id','inline_message_id','parse_mode','entities','disable_web_page_preview','reply_markup','token','return_array','forgot','answer'],
|
520
|
|
- 'editMessageCaption' => ['chat_id','message_id','inline_message_id','caption','parse_mode','caption_entities','reply_markup','token','return_array','forgot','answer'],
|
521
|
|
- 'editMessageMedia' => ['media','chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'],
|
522
|
|
- 'editMessageReplyMarkup' => ['chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'],
|
523
|
|
- 'stopPoll' => ['chat_id','message_id','reply_markup','token','return_array','forgot','answer'],
|
524
|
|
- 'deleteMessage' => ['chat_id','message_id','token','return_array','forgot','answer'],
|
525
|
|
- 'sendSticker' => ['sticker','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'],
|
526
|
|
- 'getStickerSet' => ['name','token','return_array','forgot','answer'],
|
527
|
|
- 'uploadStickerFile' => ['png_sticker','user_id','token','return_array','forgot','answer'],
|
528
|
|
- 'createNewStickerSet' => ['name','title','emojis','user_id','png_sticker','tgs_sticker','webm_sticker','contains_masks','mask_position','token','return_array','forgot','answer'],
|
529
|
|
- 'addStickerToSet' => ['name','emojis','user_id','png_sticker','tgs_sticker','webm_sticker','mask_position','token','return_array','forgot','answer'],
|
530
|
|
- 'setStickerPositionInSet' => ['sticker','position','token','return_array','forgot','answer'],
|
531
|
|
- 'deleteStickerFromSet' => ['sticker','token','return_array','forgot','answer'],
|
532
|
|
- 'setStickerSetThumb' => ['name','user_id','thumb','token','return_array','forgot','answer'],
|
533
|
|
- 'answerInlineQuery' => ['results','inline_query_id','cache_time','is_personal','next_offset','switch_pm_text','switch_pm_parameter','token','return_array','forgot','answer'],
|
534
|
|
- 'answerWebAppQuery' => ['web_app_query_id','result','token','return_array','forgot','answer'],
|
535
|
|
- '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'],
|
536
|
|
- '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'],
|
537
|
|
- 'answerShippingQuery' => ['ok','shipping_query_id','shipping_options','error_message','token','return_array','forgot','answer'],
|
538
|
|
- 'answerPreCheckoutQuery' => ['ok','pre_checkout_query_id','error_message','token','return_array','forgot','answer'],
|
539
|
|
- 'setPassportDataErrors' => ['errors','user_id','token','return_array','forgot','answer'],
|
540
|
|
- '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'],
|
541
|
|
- 'setGameScore' => ['score','user_id','force','disable_edit_message','chat_id','message_id','inline_message_id','token','return_array','forgot','answer'],
|
542
|
|
- 'getGameHighScores' => ['user_id','chat_id','message_id','inline_message_id','token','return_array','forgot','answer'],
|
|
455
|
+ 'getUpdates' => ['offset', 'limit', 'timeout', 'allowed_updates', 'token', 'return_array', 'forgot', 'answer'],
|
|
456
|
+ 'setWebhook' => ['url', 'certificate', 'ip_address', 'max_connections', 'allowed_updates', 'drop_pending_updates', 'secret_token', 'token', 'return_array', 'forgot', 'answer'],
|
|
457
|
+ 'deleteWebhook' => ['drop_pending_updates', 'token', 'return_array', 'forgot', 'answer'],
|
|
458
|
+ 'getWebhookInfo' => ['token', 'return_array', 'forgot', 'answer'],
|
|
459
|
+ 'getMe' => ['token', 'return_array', 'forgot', 'answer'],
|
|
460
|
+ 'logOut' => ['token', 'return_array', 'forgot', 'answer'],
|
|
461
|
+ 'close' => ['token', 'return_array', 'forgot', 'answer'],
|
|
462
|
+ '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'],
|
|
463
|
+ 'forwardMessage' => ['chat_id', 'from_chat_id', 'disable_notification', 'protect_content', 'message_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
464
|
+ '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'],
|
|
465
|
+ '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'],
|
|
466
|
+ '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'],
|
|
467
|
+ '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'],
|
|
468
|
+ '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'],
|
|
469
|
+ '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'],
|
|
470
|
+ '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'],
|
|
471
|
+ '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'],
|
|
472
|
+ 'sendMediaGroup' => ['media', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'token', 'return_array', 'forgot', 'answer'],
|
|
473
|
+ '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'],
|
|
474
|
+ 'editMessageLiveLocation' => ['latitude', 'longitude', 'chat_id', 'message_id', 'inline_message_id', 'horizontal_accuracy', 'heading', 'proximity_alert_radius', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
475
|
+ 'stopMessageLiveLocation' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
476
|
+ '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'],
|
|
477
|
+ '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'],
|
|
478
|
+ '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'],
|
|
479
|
+ 'sendDice' => ['chat_id', 'emoji', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
480
|
+ 'sendChatAction' => ['chat_id', 'action', 'token', 'return_array', 'forgot', 'answer'],
|
|
481
|
+ 'getUserProfilePhotos' => ['user_id', 'offset', 'limit', 'token', 'return_array', 'forgot', 'answer'],
|
|
482
|
+ 'getFile' => ['file_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
483
|
+ 'banChatMember' => ['chat_id', 'user_id', 'until_date', 'revoke_messages', 'token', 'return_array', 'forgot', 'answer'],
|
|
484
|
+ 'unbanChatMember' => ['chat_id', 'user_id', 'only_if_banned', 'token', 'return_array', 'forgot', 'answer'],
|
|
485
|
+ 'restrictChatMember' => ['permissions', 'chat_id', 'user_id', 'until_date', 'token', 'return_array', 'forgot', 'answer'],
|
|
486
|
+ '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'],
|
|
487
|
+ 'setChatAdministratorCustomTitle' => ['custom_title', 'chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
488
|
+ 'banChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
489
|
+ 'unbanChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
490
|
+ 'setChatPermissions' => ['permissions', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
491
|
+ 'exportChatInviteLink' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
492
|
+ 'createChatInviteLink' => ['chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'return_array', 'forgot', 'answer'],
|
|
493
|
+ 'editChatInviteLink' => ['invite_link', 'chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'return_array', 'forgot', 'answer'],
|
|
494
|
+ 'revokeChatInviteLink' => ['invite_link', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
495
|
+ 'approveChatJoinRequest' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
496
|
+ 'declineChatJoinRequest' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
497
|
+ 'setChatPhoto' => ['photo', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
498
|
+ 'deleteChatPhoto' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
499
|
+ 'setChatTitle' => ['title', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
500
|
+ 'setChatDescription' => ['chat_id', 'description', 'token', 'return_array', 'forgot', 'answer'],
|
|
501
|
+ 'pinChatMessage' => ['message_id', 'chat_id', 'disable_notification', 'token', 'return_array', 'forgot', 'answer'],
|
|
502
|
+ 'unpinChatMessage' => ['chat_id', 'message_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
503
|
+ 'unpinAllChatMessages' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
504
|
+ 'leaveChat' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
505
|
+ 'getChat' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
506
|
+ 'getChatAdministrators' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
507
|
+ 'getChatMemberCount' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
508
|
+ 'getChatMember' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
509
|
+ 'setChatStickerSet' => ['sticker_set_name', 'chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
510
|
+ 'deleteChatStickerSet' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
511
|
+ 'answerCallbackQuery' => ['callback_query_id', 'text', 'show_alert', 'url', 'cache_time', 'token', 'return_array', 'forgot', 'answer'],
|
|
512
|
+ 'setMyCommands' => ['commands', 'scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'],
|
|
513
|
+ 'deleteMyCommands' => ['scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'],
|
|
514
|
+ 'getMyCommands' => ['scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'],
|
|
515
|
+ 'setChatMenuButton' => ['chat_id', 'menu_button', 'token', 'return_array', 'forgot', 'answer'],
|
|
516
|
+ 'getChatMenuButton' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
517
|
+ 'setMyDefaultAdministratorRights' => ['rights', 'for_channels', 'token', 'return_array', 'forgot', 'answer'],
|
|
518
|
+ 'getMyDefaultAdministratorRights' => ['for_channels', 'token', 'return_array', 'forgot', 'answer'],
|
|
519
|
+ 'editMessageText' => ['text', 'chat_id', 'message_id', 'inline_message_id', 'parse_mode', 'entities', 'disable_web_page_preview', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
520
|
+ 'editMessageCaption' => ['chat_id', 'message_id', 'inline_message_id', 'caption', 'parse_mode', 'caption_entities', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
521
|
+ 'editMessageMedia' => ['media', 'chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
522
|
+ 'editMessageReplyMarkup' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
523
|
+ 'stopPoll' => ['chat_id', 'message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
524
|
+ 'deleteMessage' => ['chat_id', 'message_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
525
|
+ 'sendSticker' => ['sticker', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'],
|
|
526
|
+ 'getStickerSet' => ['name', 'token', 'return_array', 'forgot', 'answer'],
|
|
527
|
+ 'uploadStickerFile' => ['png_sticker', 'user_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
528
|
+ 'createNewStickerSet' => ['name', 'title', 'emojis', 'user_id', 'png_sticker', 'tgs_sticker', 'webm_sticker', 'contains_masks', 'mask_position', 'token', 'return_array', 'forgot', 'answer'],
|
|
529
|
+ 'addStickerToSet' => ['name', 'emojis', 'user_id', 'png_sticker', 'tgs_sticker', 'webm_sticker', 'mask_position', 'token', 'return_array', 'forgot', 'answer'],
|
|
530
|
+ 'setStickerPositionInSet' => ['sticker', 'position', 'token', 'return_array', 'forgot', 'answer'],
|
|
531
|
+ 'deleteStickerFromSet' => ['sticker', 'token', 'return_array', 'forgot', 'answer'],
|
|
532
|
+ 'setStickerSetThumb' => ['name', 'user_id', 'thumb', 'token', 'return_array', 'forgot', 'answer'],
|
|
533
|
+ 'answerInlineQuery' => ['results', 'inline_query_id', 'cache_time', 'is_personal', 'next_offset', 'switch_pm_text', 'switch_pm_parameter', 'token', 'return_array', 'forgot', 'answer'],
|
|
534
|
+ 'answerWebAppQuery' => ['web_app_query_id', 'result', 'token', 'return_array', 'forgot', 'answer'],
|
|
535
|
+ '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'],
|
|
536
|
+ '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'],
|
|
537
|
+ 'answerShippingQuery' => ['ok', 'shipping_query_id', 'shipping_options', 'error_message', 'token', 'return_array', 'forgot', 'answer'],
|
|
538
|
+ 'answerPreCheckoutQuery' => ['ok', 'pre_checkout_query_id', 'error_message', 'token', 'return_array', 'forgot', 'answer'],
|
|
539
|
+ 'setPassportDataErrors' => ['errors', 'user_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
540
|
+ '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'],
|
|
541
|
+ 'setGameScore' => ['score', 'user_id', 'force', 'disable_edit_message', 'chat_id', 'message_id', 'inline_message_id', 'token', 'return_array', 'forgot', 'answer'],
|
|
542
|
+ 'getGameHighScores' => ['user_id', 'chat_id', 'message_id', 'inline_message_id', 'token', 'return_array', 'forgot', 'answer'],
|
543
|
543
|
];
|
544
|
544
|
|
545
|
545
|
private const METHODS_WITH_FILE = [
|
|
@@ -568,8 +568,8 @@ discard block |
|
|
block discarded – undo |
568
|
568
|
'logOut' => [],
|
569
|
569
|
'close' => [],
|
570
|
570
|
'sendMessage' => ['chat_id'],
|
571
|
|
- 'forwardMessage' => ['from_chat_id','message_id'],
|
572
|
|
- 'copyMessage' => ['from_chat_id','message_id'],
|
|
571
|
+ 'forwardMessage' => ['from_chat_id', 'message_id'],
|
|
572
|
+ 'copyMessage' => ['from_chat_id', 'message_id'],
|
573
|
573
|
'sendPhoto' => ['chat_id'],
|
574
|
574
|
'sendAudio' => ['chat_id'],
|
575
|
575
|
'sendDocument' => ['chat_id'],
|
|
@@ -585,15 +585,15 @@ discard block |
|
|
block discarded – undo |
585
|
585
|
'sendContact' => ['chat_id'],
|
586
|
586
|
'sendPoll' => ['chat_id'],
|
587
|
587
|
'sendDice' => ['chat_id'],
|
588
|
|
- 'sendChatAction' => ['chat_id','action'],
|
|
588
|
+ 'sendChatAction' => ['chat_id', 'action'],
|
589
|
589
|
'getUserProfilePhotos' => ['user_id'],
|
590
|
590
|
'getFile' => ['file_id'],
|
591
|
|
- 'banChatMember' => ['chat_id','user_id'],
|
592
|
|
- 'kickChatMember' => ['chat_id','user_id'],
|
593
|
|
- 'unbanChatMember' => ['chat_id','user_id'],
|
594
|
|
- 'restrictChatMember' => ['chat_id','user_id'],
|
595
|
|
- 'promoteChatMember' => ['chat_id','user_id'],
|
596
|
|
- 'setChatAdministratorCustomTitle' => ['chat_id','user_id'],
|
|
591
|
+ 'banChatMember' => ['chat_id', 'user_id'],
|
|
592
|
+ 'kickChatMember' => ['chat_id', 'user_id'],
|
|
593
|
+ 'unbanChatMember' => ['chat_id', 'user_id'],
|
|
594
|
+ 'restrictChatMember' => ['chat_id', 'user_id'],
|
|
595
|
+ 'promoteChatMember' => ['chat_id', 'user_id'],
|
|
596
|
+ 'setChatAdministratorCustomTitle' => ['chat_id', 'user_id'],
|
597
|
597
|
'banChatSenderChat' => ['chat_id'],
|
598
|
598
|
'unbanChatSenderChat' => ['chat_id'],
|
599
|
599
|
'setChatPermissions' => ['chat_id'],
|
|
@@ -601,8 +601,8 @@ discard block |
|
|
block discarded – undo |
601
|
601
|
'createChatInviteLink' => ['chat_id'],
|
602
|
602
|
'editChatInviteLink' => ['chat_id'],
|
603
|
603
|
'revokeChatInviteLink' => ['chat_id'],
|
604
|
|
- 'approveChatJoinRequest' => ['chat_id','user_id'],
|
605
|
|
- 'declineChatJoinRequest' => ['chat_id','user_id'],
|
|
604
|
+ 'approveChatJoinRequest' => ['chat_id', 'user_id'],
|
|
605
|
+ 'declineChatJoinRequest' => ['chat_id', 'user_id'],
|
606
|
606
|
'setChatPhoto' => ['chat_id'],
|
607
|
607
|
'deleteChatPhoto' => ['chat_id'],
|
608
|
608
|
'setChatTitle' => ['chat_id'],
|
|
@@ -614,7 +614,7 @@ discard block |
|
|
block discarded – undo |
614
|
614
|
'getChat' => ['chat_id'],
|
615
|
615
|
'getChatAdministrators' => ['chat_id'],
|
616
|
616
|
'getChatMembersCount' => ['chat_id'],
|
617
|
|
- 'getChatMember' => ['chat_id','user_id'],
|
|
617
|
+ 'getChatMember' => ['chat_id', 'user_id'],
|
618
|
618
|
'setChatStickerSet' => ['chat_id'],
|
619
|
619
|
'deleteChatStickerSet' => ['chat_id'],
|
620
|
620
|
'answerCallbackQuery' => ['callback_query_id'],
|
|
@@ -625,12 +625,12 @@ discard block |
|
|
block discarded – undo |
625
|
625
|
'getChatMenuButton' => [],
|
626
|
626
|
'setMyDefaultAdministratorRights' => [],
|
627
|
627
|
'getMyDefaultAdministratorRights' => [],
|
628
|
|
- 'editMessageText' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']],
|
629
|
|
- 'editMessageCaption' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']],
|
630
|
|
- 'editMessageMedia' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']],
|
631
|
|
- 'editMessageReplyMarkup' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']],
|
632
|
|
- 'stopPoll' => ['chat_id','message_id'],
|
633
|
|
- 'deleteMessage' => ['chat_id','message_id'],
|
|
628
|
+ 'editMessageText' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']],
|
|
629
|
+ 'editMessageCaption' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']],
|
|
630
|
+ 'editMessageMedia' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']],
|
|
631
|
+ 'editMessageReplyMarkup' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']],
|
|
632
|
+ 'stopPoll' => ['chat_id', 'message_id'],
|
|
633
|
+ 'deleteMessage' => ['chat_id', 'message_id'],
|
634
|
634
|
'sendSticker' => ['chat_id'],
|
635
|
635
|
'getStickerSet' => [],
|
636
|
636
|
'uploadStickerFile' => ['user_id'],
|
|
@@ -646,8 +646,8 @@ discard block |
|
|
block discarded – undo |
646
|
646
|
'answerPreCheckoutQuery' => ['pre_checkout_query_id'],
|
647
|
647
|
'setPassportDataErrors' => ['user_id'],
|
648
|
648
|
'sendGame' => ['chat_id'],
|
649
|
|
- 'setGameScore' => ['user_id','inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']],
|
650
|
|
- 'getGameHighScores' => ['user_id','inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']]
|
|
649
|
+ 'setGameScore' => ['user_id', 'inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']],
|
|
650
|
+ 'getGameHighScores' => ['user_id', 'inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']]
|
651
|
651
|
];
|
652
|
652
|
|
653
|
653
|
private const METHODS_RETURN = [
|
|
@@ -699,25 +699,25 @@ discard block |
|
|
block discarded – undo |
699
|
699
|
];
|
700
|
700
|
|
701
|
701
|
|
702
|
|
- public static function __callStatic (string $name, array $arguments) {
|
|
702
|
+ public static function __callStatic(string $name, array $arguments) {
|
703
|
703
|
if ($action = self::methodAction($name)) {
|
704
|
|
- self::keysName($action,$arguments);
|
705
|
|
- self::readyFile($action,$arguments);
|
706
|
|
- self::setDefaults($action,$arguments);
|
|
704
|
+ self::keysName($action, $arguments);
|
|
705
|
+ self::readyFile($action, $arguments);
|
|
706
|
+ self::setDefaults($action, $arguments);
|
707
|
707
|
if (isset($arguments['answer'])) {
|
708
|
|
- return answer::init($action,$arguments);
|
|
708
|
+ return answer::init($action, $arguments);
|
709
|
709
|
}
|
710
|
710
|
else {
|
711
|
|
- return self::processResponse($action,curl::init($action,$arguments));
|
|
711
|
+ return self::processResponse($action, curl::init($action, $arguments));
|
712
|
712
|
}
|
713
|
713
|
}
|
714
|
714
|
else {
|
715
|
|
- logger::write("$name method is not supported",loggerTypes::ERROR);
|
|
715
|
+ logger::write("$name method is not supported", loggerTypes::ERROR);
|
716
|
716
|
throw new bptException('METHOD_NOT_FOUND');
|
717
|
717
|
}
|
718
|
718
|
}
|
719
|
719
|
|
720
|
|
- private static function keysName (string $name, array &$arguments) {
|
|
720
|
+ private static function keysName(string $name, array &$arguments) {
|
721
|
721
|
foreach ($arguments as $key => $argument) {
|
722
|
722
|
if (is_numeric($key) && isset(self::METHODS_KEYS[$name][$key])) {
|
723
|
723
|
$arguments[self::METHODS_KEYS[$name][$key]] = $argument;
|
|
@@ -726,7 +726,7 @@ discard block |
|
|
block discarded – undo |
726
|
726
|
}
|
727
|
727
|
}
|
728
|
728
|
|
729
|
|
- private static function methodAction(string $name): string|false {
|
|
729
|
+ private static function methodAction(string $name): string | false {
|
730
|
730
|
return self::METHODS_ACTION[str_replace('_', '', strtolower($name))] ?? false;
|
731
|
731
|
}
|
732
|
732
|
|
|
@@ -747,11 +747,11 @@ discard block |
|
|
block discarded – undo |
747
|
747
|
}
|
748
|
748
|
}
|
749
|
749
|
|
750
|
|
- private static function methodFile(string $name): array|false {
|
|
750
|
+ private static function methodFile(string $name): array | false {
|
751
|
751
|
return self::METHODS_WITH_FILE[$name] ?? false;
|
752
|
752
|
}
|
753
|
753
|
|
754
|
|
- private static function methodReturn(string $name,stdClass $response) {
|
|
754
|
+ private static function methodReturn(string $name, stdClass $response) {
|
755
|
755
|
if (isset(self::METHODS_RETURN[$name])) {
|
756
|
756
|
$return = self::METHODS_RETURN[$name];
|
757
|
757
|
if (is_array($return)) {
|
|
@@ -774,13 +774,13 @@ discard block |
|
|
block discarded – undo |
774
|
774
|
$defaults = self::METHODS_EXTRA_DEFAULTS[$name];
|
775
|
775
|
foreach ($defaults as $key => $default) {
|
776
|
776
|
if (is_numeric($key)) {
|
777
|
|
- if (!isset($arguments[$default])){
|
|
777
|
+ if (!isset($arguments[$default])) {
|
778
|
778
|
$arguments[$default] = self::catchFields($default);
|
779
|
779
|
}
|
780
|
780
|
}
|
781
|
781
|
elseif (isset(BPT::$update->$key) || $key === 'other') {
|
782
|
782
|
foreach ($default as $def) {
|
783
|
|
- if (!isset($arguments[$def])){
|
|
783
|
+ if (!isset($arguments[$def])) {
|
784
|
784
|
$arguments[$def] = self::catchFields($def);
|
785
|
785
|
}
|
786
|
786
|
}
|
|
@@ -793,7 +793,7 @@ discard block |
|
|
block discarded – undo |
793
|
793
|
if ($response->ok) {
|
794
|
794
|
self::$status = true;
|
795
|
795
|
self::$pure_response = $response;
|
796
|
|
- return self::methodReturn($name,$response);
|
|
796
|
+ return self::methodReturn($name, $response);
|
797
|
797
|
}
|
798
|
798
|
else {
|
799
|
799
|
self::$status = false;
|
|
@@ -802,7 +802,7 @@ discard block |
|
|
block discarded – undo |
802
|
802
|
}
|
803
|
803
|
}
|
804
|
804
|
|
805
|
|
- public static function catchFields (string $field): int|string|bool {
|
|
805
|
+ public static function catchFields(string $field): int | string | bool {
|
806
|
806
|
switch ($field) {
|
807
|
807
|
case 'chat_id' :
|
808
|
808
|
case 'from_chat_id' :
|
|
@@ -938,7 +938,7 @@ discard block |
|
|
block discarded – undo |
938
|
938
|
default => false
|
939
|
939
|
};
|
940
|
940
|
case 'url' :
|
941
|
|
- return 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
|
941
|
+ return 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
|
942
|
942
|
default:
|
943
|
943
|
return false;
|
944
|
944
|
}
|