|
@@ -480,95 +480,95 @@ discard block |
|
|
block discarded – undo |
|
480
|
480
|
]; |
|
481
|
481
|
|
|
482
|
482
|
private const METHODS_KEYS = [ |
|
483
|
|
- 'getUpdates' => ['offset','limit','timeout','allowed_updates','token','return_array','forgot','answer'], |
|
484
|
|
- 'setWebhook' => ['url','certificate','ip_address','max_connections','allowed_updates','drop_pending_updates','secret_token','token','return_array','forgot','answer'], |
|
485
|
|
- 'deleteWebhook' => ['drop_pending_updates','token','return_array','forgot','answer'], |
|
486
|
|
- 'getWebhookInfo' => ['token','return_array','forgot','answer'], |
|
487
|
|
- 'getMe' => ['token','return_array','forgot','answer'], |
|
488
|
|
- 'logOut' => ['token','return_array','forgot','answer'], |
|
489
|
|
- 'close' => ['token','return_array','forgot','answer'], |
|
490
|
|
- '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'], |
|
491
|
|
- 'forwardMessage' => ['chat_id','from_chat_id','disable_notification','protect_content','message_id','token','return_array','forgot','answer'], |
|
492
|
|
- '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'], |
|
493
|
|
- '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'], |
|
494
|
|
- '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'], |
|
495
|
|
- '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'], |
|
496
|
|
- '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'], |
|
497
|
|
- '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'], |
|
498
|
|
- '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'], |
|
499
|
|
- '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'], |
|
500
|
|
- 'sendMediaGroup' => ['media','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','token','return_array','forgot','answer'], |
|
501
|
|
- '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'], |
|
502
|
|
- 'editMessageLiveLocation' => ['latitude','longitude','chat_id','message_id','inline_message_id','horizontal_accuracy','heading','proximity_alert_radius','reply_markup','token','return_array','forgot','answer'], |
|
503
|
|
- 'stopMessageLiveLocation' => ['chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'], |
|
504
|
|
- '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'], |
|
505
|
|
- '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'], |
|
506
|
|
- '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'], |
|
507
|
|
- 'sendDice' => ['chat_id','emoji','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
508
|
|
- 'sendChatAction' => ['chat_id','action','token','return_array','forgot','answer'], |
|
509
|
|
- 'getUserProfilePhotos' => ['user_id','offset','limit','token','return_array','forgot','answer'], |
|
510
|
|
- 'getFile' => ['file_id','token','return_array','forgot','answer'], |
|
511
|
|
- 'banChatMember' => ['chat_id','user_id','until_date','revoke_messages','token','return_array','forgot','answer'], |
|
512
|
|
- 'unbanChatMember' => ['chat_id','user_id','only_if_banned','token','return_array','forgot','answer'], |
|
513
|
|
- 'restrictChatMember' => ['permissions','chat_id','user_id','until_date','token','return_array','forgot','answer'], |
|
514
|
|
- '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'], |
|
515
|
|
- 'setChatAdministratorCustomTitle' => ['custom_title','chat_id','user_id','token','return_array','forgot','answer'], |
|
516
|
|
- 'banChatSenderChat' => ['sender_chat_id','chat_id','token','return_array','forgot','answer'], |
|
517
|
|
- 'unbanChatSenderChat' => ['sender_chat_id','chat_id','token','return_array','forgot','answer'], |
|
518
|
|
- 'setChatPermissions' => ['permissions','chat_id','token','return_array','forgot','answer'], |
|
519
|
|
- 'exportChatInviteLink' => ['chat_id','token','return_array','forgot','answer'], |
|
520
|
|
- 'createChatInviteLink' => ['chat_id','name','expire_date','member_limit','creates_join_request','token','return_array','forgot','answer'], |
|
521
|
|
- 'editChatInviteLink' => ['invite_link','chat_id','name','expire_date','member_limit','creates_join_request','token','return_array','forgot','answer'], |
|
522
|
|
- 'revokeChatInviteLink' => ['invite_link','chat_id','token','return_array','forgot','answer'], |
|
523
|
|
- 'approveChatJoinRequest' => ['chat_id','user_id','token','return_array','forgot','answer'], |
|
524
|
|
- 'declineChatJoinRequest' => ['chat_id','user_id','token','return_array','forgot','answer'], |
|
525
|
|
- 'setChatPhoto' => ['photo','chat_id','token','return_array','forgot','answer'], |
|
526
|
|
- 'deleteChatPhoto' => ['chat_id','token','return_array','forgot','answer'], |
|
527
|
|
- 'setChatTitle' => ['title','chat_id','token','return_array','forgot','answer'], |
|
528
|
|
- 'setChatDescription' => ['chat_id','description','token','return_array','forgot','answer'], |
|
529
|
|
- 'pinChatMessage' => ['message_id','chat_id','disable_notification','token','return_array','forgot','answer'], |
|
530
|
|
- 'unpinChatMessage' => ['chat_id','message_id','token','return_array','forgot','answer'], |
|
531
|
|
- 'unpinAllChatMessages' => ['chat_id','token','return_array','forgot','answer'], |
|
532
|
|
- 'leaveChat' => ['chat_id','token','return_array','forgot','answer'], |
|
533
|
|
- 'getChat' => ['chat_id','token','return_array','forgot','answer'], |
|
534
|
|
- 'getChatAdministrators' => ['chat_id','token','return_array','forgot','answer'], |
|
535
|
|
- 'getChatMemberCount' => ['chat_id','token','return_array','forgot','answer'], |
|
536
|
|
- 'getChatMember' => ['chat_id','user_id','token','return_array','forgot','answer'], |
|
537
|
|
- 'setChatStickerSet' => ['sticker_set_name','chat_id','token','return_array','forgot','answer'], |
|
538
|
|
- 'deleteChatStickerSet' => ['chat_id','token','return_array','forgot','answer'], |
|
539
|
|
- 'answerCallbackQuery' => ['callback_query_id','text','show_alert','url','cache_time','token','return_array','forgot','answer'], |
|
540
|
|
- 'setMyCommands' => ['commands','scope','language_code','token','return_array','forgot','answer'], |
|
541
|
|
- 'deleteMyCommands' => ['scope','language_code','token','return_array','forgot','answer'], |
|
542
|
|
- 'getMyCommands' => ['scope','language_code','token','return_array','forgot','answer'], |
|
543
|
|
- 'setChatMenuButton' => ['chat_id','menu_button','token','return_array','forgot','answer'], |
|
544
|
|
- 'getChatMenuButton' => ['chat_id','token','return_array','forgot','answer'], |
|
545
|
|
- 'setMyDefaultAdministratorRights' => ['rights','for_channels','token','return_array','forgot','answer'], |
|
546
|
|
- 'getMyDefaultAdministratorRights' => ['for_channels','token','return_array','forgot','answer'], |
|
547
|
|
- 'editMessageText' => ['text','chat_id','message_id','inline_message_id','parse_mode','entities','disable_web_page_preview','reply_markup','token','return_array','forgot','answer'], |
|
548
|
|
- 'editMessageCaption' => ['chat_id','message_id','inline_message_id','caption','parse_mode','caption_entities','reply_markup','token','return_array','forgot','answer'], |
|
549
|
|
- 'editMessageMedia' => ['media','chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'], |
|
550
|
|
- 'editMessageReplyMarkup' => ['chat_id','message_id','inline_message_id','reply_markup','token','return_array','forgot','answer'], |
|
551
|
|
- 'stopPoll' => ['chat_id','message_id','reply_markup','token','return_array','forgot','answer'], |
|
552
|
|
- 'deleteMessage' => ['chat_id','message_id','token','return_array','forgot','answer'], |
|
553
|
|
- 'sendSticker' => ['sticker','chat_id','disable_notification','protect_content','reply_to_message_id','allow_sending_without_reply','reply_markup','token','return_array','forgot','answer'], |
|
554
|
|
- 'getStickerSet' => ['name','token','return_array','forgot','answer'], |
|
|
483
|
+ 'getUpdates' => ['offset', 'limit', 'timeout', 'allowed_updates', 'token', 'return_array', 'forgot', 'answer'], |
|
|
484
|
+ 'setWebhook' => ['url', 'certificate', 'ip_address', 'max_connections', 'allowed_updates', 'drop_pending_updates', 'secret_token', 'token', 'return_array', 'forgot', 'answer'], |
|
|
485
|
+ 'deleteWebhook' => ['drop_pending_updates', 'token', 'return_array', 'forgot', 'answer'], |
|
|
486
|
+ 'getWebhookInfo' => ['token', 'return_array', 'forgot', 'answer'], |
|
|
487
|
+ 'getMe' => ['token', 'return_array', 'forgot', 'answer'], |
|
|
488
|
+ 'logOut' => ['token', 'return_array', 'forgot', 'answer'], |
|
|
489
|
+ 'close' => ['token', 'return_array', 'forgot', 'answer'], |
|
|
490
|
+ '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'], |
|
|
491
|
+ 'forwardMessage' => ['chat_id', 'from_chat_id', 'disable_notification', 'protect_content', 'message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
492
|
+ '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'], |
|
|
493
|
+ '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'], |
|
|
494
|
+ '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'], |
|
|
495
|
+ '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'], |
|
|
496
|
+ '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'], |
|
|
497
|
+ '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'], |
|
|
498
|
+ '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'], |
|
|
499
|
+ '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'], |
|
|
500
|
+ 'sendMediaGroup' => ['media', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'token', 'return_array', 'forgot', 'answer'], |
|
|
501
|
+ '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'], |
|
|
502
|
+ 'editMessageLiveLocation' => ['latitude', 'longitude', 'chat_id', 'message_id', 'inline_message_id', 'horizontal_accuracy', 'heading', 'proximity_alert_radius', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
503
|
+ 'stopMessageLiveLocation' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
504
|
+ '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'], |
|
|
505
|
+ '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'], |
|
|
506
|
+ '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'], |
|
|
507
|
+ 'sendDice' => ['chat_id', 'emoji', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
508
|
+ 'sendChatAction' => ['chat_id', 'action', 'token', 'return_array', 'forgot', 'answer'], |
|
|
509
|
+ 'getUserProfilePhotos' => ['user_id', 'offset', 'limit', 'token', 'return_array', 'forgot', 'answer'], |
|
|
510
|
+ 'getFile' => ['file_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
511
|
+ 'banChatMember' => ['chat_id', 'user_id', 'until_date', 'revoke_messages', 'token', 'return_array', 'forgot', 'answer'], |
|
|
512
|
+ 'unbanChatMember' => ['chat_id', 'user_id', 'only_if_banned', 'token', 'return_array', 'forgot', 'answer'], |
|
|
513
|
+ 'restrictChatMember' => ['permissions', 'chat_id', 'user_id', 'until_date', 'token', 'return_array', 'forgot', 'answer'], |
|
|
514
|
+ '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'], |
|
|
515
|
+ 'setChatAdministratorCustomTitle' => ['custom_title', 'chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
516
|
+ 'banChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
517
|
+ 'unbanChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
518
|
+ 'setChatPermissions' => ['permissions', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
519
|
+ 'exportChatInviteLink' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
520
|
+ 'createChatInviteLink' => ['chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'return_array', 'forgot', 'answer'], |
|
|
521
|
+ 'editChatInviteLink' => ['invite_link', 'chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'return_array', 'forgot', 'answer'], |
|
|
522
|
+ 'revokeChatInviteLink' => ['invite_link', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
523
|
+ 'approveChatJoinRequest' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
524
|
+ 'declineChatJoinRequest' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
525
|
+ 'setChatPhoto' => ['photo', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
526
|
+ 'deleteChatPhoto' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
527
|
+ 'setChatTitle' => ['title', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
528
|
+ 'setChatDescription' => ['chat_id', 'description', 'token', 'return_array', 'forgot', 'answer'], |
|
|
529
|
+ 'pinChatMessage' => ['message_id', 'chat_id', 'disable_notification', 'token', 'return_array', 'forgot', 'answer'], |
|
|
530
|
+ 'unpinChatMessage' => ['chat_id', 'message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
531
|
+ 'unpinAllChatMessages' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
532
|
+ 'leaveChat' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
533
|
+ 'getChat' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
534
|
+ 'getChatAdministrators' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
535
|
+ 'getChatMemberCount' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
536
|
+ 'getChatMember' => ['chat_id', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
537
|
+ 'setChatStickerSet' => ['sticker_set_name', 'chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
538
|
+ 'deleteChatStickerSet' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
539
|
+ 'answerCallbackQuery' => ['callback_query_id', 'text', 'show_alert', 'url', 'cache_time', 'token', 'return_array', 'forgot', 'answer'], |
|
|
540
|
+ 'setMyCommands' => ['commands', 'scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'], |
|
|
541
|
+ 'deleteMyCommands' => ['scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'], |
|
|
542
|
+ 'getMyCommands' => ['scope', 'language_code', 'token', 'return_array', 'forgot', 'answer'], |
|
|
543
|
+ 'setChatMenuButton' => ['chat_id', 'menu_button', 'token', 'return_array', 'forgot', 'answer'], |
|
|
544
|
+ 'getChatMenuButton' => ['chat_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
545
|
+ 'setMyDefaultAdministratorRights' => ['rights', 'for_channels', 'token', 'return_array', 'forgot', 'answer'], |
|
|
546
|
+ 'getMyDefaultAdministratorRights' => ['for_channels', 'token', 'return_array', 'forgot', 'answer'], |
|
|
547
|
+ 'editMessageText' => ['text', 'chat_id', 'message_id', 'inline_message_id', 'parse_mode', 'entities', 'disable_web_page_preview', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
548
|
+ 'editMessageCaption' => ['chat_id', 'message_id', 'inline_message_id', 'caption', 'parse_mode', 'caption_entities', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
549
|
+ 'editMessageMedia' => ['media', 'chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
550
|
+ 'editMessageReplyMarkup' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
551
|
+ 'stopPoll' => ['chat_id', 'message_id', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
552
|
+ 'deleteMessage' => ['chat_id', 'message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
553
|
+ 'sendSticker' => ['sticker', 'chat_id', 'disable_notification', 'protect_content', 'reply_to_message_id', 'allow_sending_without_reply', 'reply_markup', 'token', 'return_array', 'forgot', 'answer'], |
|
|
554
|
+ 'getStickerSet' => ['name', 'token', 'return_array', 'forgot', 'answer'], |
|
555
|
555
|
'getCustomEmojiStickers' => ['custom_emoji_ids', 'token', 'return_array', 'forgot', 'answer'], |
|
556
|
|
- 'uploadStickerFile' => ['png_sticker','user_id','token','return_array','forgot','answer'], |
|
557
|
|
- 'createNewStickerSet' => ['name','title','emojis','user_id','png_sticker','tgs_sticker','webm_sticker','sticker_type','contains_masks','mask_position','token','return_array','forgot','answer'], |
|
558
|
|
- 'addStickerToSet' => ['name','emojis','user_id','png_sticker','tgs_sticker','webm_sticker','mask_position','token','return_array','forgot','answer'], |
|
559
|
|
- 'setStickerPositionInSet' => ['sticker','position','token','return_array','forgot','answer'], |
|
560
|
|
- 'deleteStickerFromSet' => ['sticker','token','return_array','forgot','answer'], |
|
561
|
|
- 'setStickerSetThumb' => ['name','user_id','thumb','token','return_array','forgot','answer'], |
|
562
|
|
- 'answerInlineQuery' => ['results','inline_query_id','cache_time','is_personal','next_offset','switch_pm_text','switch_pm_parameter','token','return_array','forgot','answer'], |
|
563
|
|
- 'answerWebAppQuery' => ['web_app_query_id','result','token','return_array','forgot','answer'], |
|
564
|
|
- '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'], |
|
565
|
|
- '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'], |
|
566
|
|
- 'answerShippingQuery' => ['ok','shipping_query_id','shipping_options','error_message','token','return_array','forgot','answer'], |
|
567
|
|
- 'answerPreCheckoutQuery' => ['ok','pre_checkout_query_id','error_message','token','return_array','forgot','answer'], |
|
568
|
|
- 'setPassportDataErrors' => ['errors','user_id','token','return_array','forgot','answer'], |
|
569
|
|
- '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'], |
|
570
|
|
- 'setGameScore' => ['score','user_id','force','disable_edit_message','chat_id','message_id','inline_message_id','token','return_array','forgot','answer'], |
|
571
|
|
- 'getGameHighScores' => ['user_id','chat_id','message_id','inline_message_id','token','return_array','forgot','answer'], |
|
|
556
|
+ 'uploadStickerFile' => ['png_sticker', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
557
|
+ 'createNewStickerSet' => ['name', 'title', 'emojis', 'user_id', 'png_sticker', 'tgs_sticker', 'webm_sticker', 'sticker_type', 'contains_masks', 'mask_position', 'token', 'return_array', 'forgot', 'answer'], |
|
|
558
|
+ 'addStickerToSet' => ['name', 'emojis', 'user_id', 'png_sticker', 'tgs_sticker', 'webm_sticker', 'mask_position', 'token', 'return_array', 'forgot', 'answer'], |
|
|
559
|
+ 'setStickerPositionInSet' => ['sticker', 'position', 'token', 'return_array', 'forgot', 'answer'], |
|
|
560
|
+ 'deleteStickerFromSet' => ['sticker', 'token', 'return_array', 'forgot', 'answer'], |
|
|
561
|
+ 'setStickerSetThumb' => ['name', 'user_id', 'thumb', 'token', 'return_array', 'forgot', 'answer'], |
|
|
562
|
+ 'answerInlineQuery' => ['results', 'inline_query_id', 'cache_time', 'is_personal', 'next_offset', 'switch_pm_text', 'switch_pm_parameter', 'token', 'return_array', 'forgot', 'answer'], |
|
|
563
|
+ 'answerWebAppQuery' => ['web_app_query_id', 'result', 'token', 'return_array', 'forgot', 'answer'], |
|
|
564
|
+ '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'], |
|
|
565
|
+ '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'], |
|
|
566
|
+ 'answerShippingQuery' => ['ok', 'shipping_query_id', 'shipping_options', 'error_message', 'token', 'return_array', 'forgot', 'answer'], |
|
|
567
|
+ 'answerPreCheckoutQuery' => ['ok', 'pre_checkout_query_id', 'error_message', 'token', 'return_array', 'forgot', 'answer'], |
|
|
568
|
+ 'setPassportDataErrors' => ['errors', 'user_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
569
|
+ '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'], |
|
|
570
|
+ 'setGameScore' => ['score', 'user_id', 'force', 'disable_edit_message', 'chat_id', 'message_id', 'inline_message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
|
571
|
+ 'getGameHighScores' => ['user_id', 'chat_id', 'message_id', 'inline_message_id', 'token', 'return_array', 'forgot', 'answer'], |
|
572
|
572
|
'getForumTopicIconStickers' => ['token', 'return_array', 'forgot', 'answer'], |
|
573
|
573
|
'createForumTopic' => ['chat_id', 'name', 'icon_color', 'icon_custom_emoji_id', 'token', 'return_array', 'forgot', 'answer'], |
|
574
|
574
|
'editForumTopic' => ['chat_id', 'message_thread_id', 'name', 'icon_custom_emoji_id', 'token', 'return_array', 'forgot', 'answer'], |
|
@@ -604,8 +604,8 @@ discard block |
|
|
block discarded – undo |
|
604
|
604
|
'logOut' => [], |
|
605
|
605
|
'close' => [], |
|
606
|
606
|
'sendMessage' => ['chat_id'], |
|
607
|
|
- 'forwardMessage' => ['from_chat_id','message_id'], |
|
608
|
|
- 'copyMessage' => ['from_chat_id','message_id'], |
|
|
607
|
+ 'forwardMessage' => ['from_chat_id', 'message_id'], |
|
|
608
|
+ 'copyMessage' => ['from_chat_id', 'message_id'], |
|
609
|
609
|
'sendPhoto' => ['chat_id'], |
|
610
|
610
|
'sendAudio' => ['chat_id'], |
|
611
|
611
|
'sendDocument' => ['chat_id'], |
|
@@ -621,15 +621,15 @@ discard block |
|
|
block discarded – undo |
|
621
|
621
|
'sendContact' => ['chat_id'], |
|
622
|
622
|
'sendPoll' => ['chat_id'], |
|
623
|
623
|
'sendDice' => ['chat_id'], |
|
624
|
|
- 'sendChatAction' => ['chat_id','action'], |
|
|
624
|
+ 'sendChatAction' => ['chat_id', 'action'], |
|
625
|
625
|
'getUserProfilePhotos' => ['user_id'], |
|
626
|
626
|
'getFile' => ['file_id'], |
|
627
|
|
- 'banChatMember' => ['chat_id','user_id'], |
|
628
|
|
- 'kickChatMember' => ['chat_id','user_id'], |
|
629
|
|
- 'unbanChatMember' => ['chat_id','user_id'], |
|
630
|
|
- 'restrictChatMember' => ['chat_id','user_id'], |
|
631
|
|
- 'promoteChatMember' => ['chat_id','user_id'], |
|
632
|
|
- 'setChatAdministratorCustomTitle' => ['chat_id','user_id'], |
|
|
627
|
+ 'banChatMember' => ['chat_id', 'user_id'], |
|
|
628
|
+ 'kickChatMember' => ['chat_id', 'user_id'], |
|
|
629
|
+ 'unbanChatMember' => ['chat_id', 'user_id'], |
|
|
630
|
+ 'restrictChatMember' => ['chat_id', 'user_id'], |
|
|
631
|
+ 'promoteChatMember' => ['chat_id', 'user_id'], |
|
|
632
|
+ 'setChatAdministratorCustomTitle' => ['chat_id', 'user_id'], |
|
633
|
633
|
'banChatSenderChat' => ['chat_id'], |
|
634
|
634
|
'unbanChatSenderChat' => ['chat_id'], |
|
635
|
635
|
'setChatPermissions' => ['chat_id'], |
|
@@ -637,8 +637,8 @@ discard block |
|
|
block discarded – undo |
|
637
|
637
|
'createChatInviteLink' => ['chat_id'], |
|
638
|
638
|
'editChatInviteLink' => ['chat_id'], |
|
639
|
639
|
'revokeChatInviteLink' => ['chat_id'], |
|
640
|
|
- 'approveChatJoinRequest' => ['chat_id','user_id'], |
|
641
|
|
- 'declineChatJoinRequest' => ['chat_id','user_id'], |
|
|
640
|
+ 'approveChatJoinRequest' => ['chat_id', 'user_id'], |
|
|
641
|
+ 'declineChatJoinRequest' => ['chat_id', 'user_id'], |
|
642
|
642
|
'setChatPhoto' => ['chat_id'], |
|
643
|
643
|
'deleteChatPhoto' => ['chat_id'], |
|
644
|
644
|
'setChatTitle' => ['chat_id'], |
|
@@ -650,7 +650,7 @@ discard block |
|
|
block discarded – undo |
|
650
|
650
|
'getChat' => ['chat_id'], |
|
651
|
651
|
'getChatAdministrators' => ['chat_id'], |
|
652
|
652
|
'getChatMembersCount' => ['chat_id'], |
|
653
|
|
- 'getChatMember' => ['chat_id','user_id'], |
|
|
653
|
+ 'getChatMember' => ['chat_id', 'user_id'], |
|
654
|
654
|
'setChatStickerSet' => ['chat_id'], |
|
655
|
655
|
'deleteChatStickerSet' => ['chat_id'], |
|
656
|
656
|
'answerCallbackQuery' => ['callback_query_id'], |
|
@@ -661,12 +661,12 @@ discard block |
|
|
block discarded – undo |
|
661
|
661
|
'getChatMenuButton' => [], |
|
662
|
662
|
'setMyDefaultAdministratorRights' => [], |
|
663
|
663
|
'getMyDefaultAdministratorRights' => [], |
|
664
|
|
- 'editMessageText' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']], |
|
665
|
|
- 'editMessageCaption' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']], |
|
666
|
|
- 'editMessageMedia' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']], |
|
667
|
|
- 'editMessageReplyMarkup' => ['inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']], |
|
668
|
|
- 'stopPoll' => ['chat_id','message_id'], |
|
669
|
|
- 'deleteMessage' => ['chat_id','message_id'], |
|
|
664
|
+ 'editMessageText' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']], |
|
|
665
|
+ 'editMessageCaption' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']], |
|
|
666
|
+ 'editMessageMedia' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']], |
|
|
667
|
+ 'editMessageReplyMarkup' => ['inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']], |
|
|
668
|
+ 'stopPoll' => ['chat_id', 'message_id'], |
|
|
669
|
+ 'deleteMessage' => ['chat_id', 'message_id'], |
|
670
|
670
|
'sendSticker' => ['chat_id'], |
|
671
|
671
|
'getStickerSet' => [], |
|
672
|
672
|
'uploadStickerFile' => ['user_id'], |
|
@@ -682,8 +682,8 @@ discard block |
|
|
block discarded – undo |
|
682
|
682
|
'answerPreCheckoutQuery' => ['pre_checkout_query_id'], |
|
683
|
683
|
'setPassportDataErrors' => ['user_id'], |
|
684
|
684
|
'sendGame' => ['chat_id'], |
|
685
|
|
- 'setGameScore' => ['user_id','inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']], |
|
686
|
|
- 'getGameHighScores' => ['user_id','inline_query'=>['inline_message_id'],'other'=>['chat_id','message_id']] |
|
|
685
|
+ 'setGameScore' => ['user_id', 'inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']], |
|
|
686
|
+ 'getGameHighScores' => ['user_id', 'inline_query'=>['inline_message_id'], 'other'=>['chat_id', 'message_id']] |
|
687
|
687
|
]; |
|
688
|
688
|
|
|
689
|
689
|
private const METHODS_RETURN = [ |
|
@@ -737,25 +737,25 @@ discard block |
|
|
block discarded – undo |
|
737
|
737
|
'getGameHighScores' => ['BPT\types\gameHighScore'] |
|
738
|
738
|
]; |
|
739
|
739
|
|
|
740
|
|
- public static function __callStatic (string $name, array $arguments) { |
|
|
740
|
+ public static function __callStatic(string $name, array $arguments) { |
|
741
|
741
|
if ($action = self::methodAction($name)) { |
|
742
|
742
|
self::checkArguments($arguments); |
|
743
|
|
- self::keysName($action,$arguments); |
|
744
|
|
- self::readyFile($action,$arguments); |
|
745
|
|
- self::setDefaults($action,$arguments); |
|
|
743
|
+ self::keysName($action, $arguments); |
|
|
744
|
+ self::readyFile($action, $arguments); |
|
|
745
|
+ self::setDefaults($action, $arguments); |
|
746
|
746
|
if (isset($arguments['answer'])) { |
|
747
|
|
- return answer::init($action,$arguments); |
|
|
747
|
+ return answer::init($action, $arguments); |
|
748
|
748
|
} |
|
749
|
749
|
else { |
|
750
|
|
- $result = curl::init($action,$arguments); |
|
|
750
|
+ $result = curl::init($action, $arguments); |
|
751
|
751
|
if (is_object($result)) { |
|
752
|
|
- return self::processResponse($action,$result); |
|
|
752
|
+ return self::processResponse($action, $result); |
|
753
|
753
|
} |
|
754
|
754
|
return false; |
|
755
|
755
|
} |
|
756
|
756
|
} |
|
757
|
757
|
else { |
|
758
|
|
- logger::write("$name method is not supported",loggerTypes::ERROR); |
|
|
758
|
+ logger::write("$name method is not supported", loggerTypes::ERROR); |
|
759
|
759
|
throw new bptException('METHOD_NOT_FOUND'); |
|
760
|
760
|
} |
|
761
|
761
|
} |
|
@@ -766,7 +766,7 @@ discard block |
|
|
block discarded – undo |
|
766
|
766
|
} |
|
767
|
767
|
} |
|
768
|
768
|
|
|
769
|
|
- private static function keysName (string $name, array &$arguments): void { |
|
|
769
|
+ private static function keysName(string $name, array &$arguments): void { |
|
770
|
770
|
foreach ($arguments as $key => $argument) { |
|
771
|
771
|
if (is_numeric($key) && isset(self::METHODS_KEYS[$name][$key])) { |
|
772
|
772
|
$arguments[self::METHODS_KEYS[$name][$key]] = $argument; |
|
@@ -775,7 +775,7 @@ discard block |
|
|
block discarded – undo |
|
775
|
775
|
} |
|
776
|
776
|
} |
|
777
|
777
|
|
|
778
|
|
- private static function methodAction(string $name): string|false { |
|
|
778
|
+ private static function methodAction(string $name): string | false { |
|
779
|
779
|
return self::METHODS_ACTION[str_replace('_', '', strtolower($name))] ?? false; |
|
780
|
780
|
} |
|
781
|
781
|
|
|
@@ -796,11 +796,11 @@ discard block |
|
|
block discarded – undo |
|
796
|
796
|
} |
|
797
|
797
|
} |
|
798
|
798
|
|
|
799
|
|
- private static function methodFile(string $name): array|false { |
|
|
799
|
+ private static function methodFile(string $name): array | false { |
|
800
|
800
|
return self::METHODS_WITH_FILE[$name] ?? false; |
|
801
|
801
|
} |
|
802
|
802
|
|
|
803
|
|
- private static function methodReturn(string $name,stdClass $response) { |
|
|
803
|
+ private static function methodReturn(string $name, stdClass $response) { |
|
804
|
804
|
if (isset(self::METHODS_RETURN[$name])) { |
|
805
|
805
|
$return = self::METHODS_RETURN[$name]; |
|
806
|
806
|
if (is_array($return)) { |
|
@@ -823,13 +823,13 @@ discard block |
|
|
block discarded – undo |
|
823
|
823
|
$defaults = self::METHODS_EXTRA_DEFAULTS[$name]; |
|
824
|
824
|
foreach ($defaults as $key => $default) { |
|
825
|
825
|
if (is_numeric($key)) { |
|
826
|
|
- if (!isset($arguments[$default])){ |
|
|
826
|
+ if (!isset($arguments[$default])) { |
|
827
|
827
|
$arguments[$default] = self::catchFields($default); |
|
828
|
828
|
} |
|
829
|
829
|
} |
|
830
|
830
|
elseif (isset(BPT::$update->$key) || $key === 'other') { |
|
831
|
831
|
foreach ($default as $def) { |
|
832
|
|
- if (!isset($arguments[$def])){ |
|
|
832
|
+ if (!isset($arguments[$def])) { |
|
833
|
833
|
$arguments[$def] = self::catchFields($def); |
|
834
|
834
|
} |
|
835
|
835
|
} |
|
@@ -842,7 +842,7 @@ discard block |
|
|
block discarded – undo |
|
842
|
842
|
if ($response->ok) { |
|
843
|
843
|
self::$status = true; |
|
844
|
844
|
self::$pure_response = $response; |
|
845
|
|
- return self::methodReturn($name,$response); |
|
|
845
|
+ return self::methodReturn($name, $response); |
|
846
|
846
|
} |
|
847
|
847
|
else { |
|
848
|
848
|
self::$status = false; |
|
@@ -858,7 +858,7 @@ discard block |
|
|
block discarded – undo |
|
858
|
858
|
* |
|
859
|
859
|
* @return int|string|bool |
|
860
|
860
|
*/ |
|
861
|
|
- public static function catchFields (string $field): int|string|bool { |
|
|
861
|
+ public static function catchFields(string $field): int | string | bool { |
|
862
|
862
|
switch ($field) { |
|
863
|
863
|
case fields::CHAT_ID : |
|
864
|
864
|
case fields::FROM_CHAT_ID : |
|
@@ -994,7 +994,7 @@ discard block |
|
|
block discarded – undo |
|
994
|
994
|
default => false |
|
995
|
995
|
}; |
|
996
|
996
|
case fields::URL : |
|
997
|
|
- return 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; |
|
|
997
|
+ return 'https://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; |
|
998
|
998
|
default: |
|
999
|
999
|
return false; |
|
1000
|
1000
|
} |