Refactor optional parameters in method signatures
This commit is contained in:
parent
69916fed3e
commit
17318e5724
1 changed files with 11 additions and 11 deletions
|
@ -117,9 +117,9 @@
|
|||
* @method bool setChatPhoto(string|int $chat_id, string $photo) Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
||||
* @method bool deleteChatPhoto(string|int $chat_id) Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
||||
* @method bool setChatTitle(string|int $chat_id, string $title) Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
||||
* @method bool setChatDescription(string|int $chat_id, string $description = null) Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
||||
* @method bool pinChatMessage(string|int $chat_id, int $message_id, string $business_connection_id = null, bool $disable_notification = null) Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
||||
* @method bool unpinChatMessage(string|int $chat_id, string $business_connection_id = null, int $message_id = null) Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
||||
* @method bool setChatDescription(string|int $chat_id, ?string $description=null) Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
|
||||
* @method bool pinChatMessage(string|int $chat_id, int $message_id, ?string $business_connection_id=null, ?bool $disable_notification=null) Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
||||
* @method bool unpinChatMessage(string|int $chat_id, ?string $business_connection_id=null, ?int $message_id=null) Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
||||
* @method bool unpinAllChatMessages(string|int $chat_id) Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success.
|
||||
* @method bool leaveChat(string|int $chat_id) Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
|
||||
* @method ChatFullInfo getChat(string|int $chat_id) Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.
|
||||
|
@ -129,8 +129,8 @@
|
|||
* @method bool setChatStickerSet(string|int $chat_id, string $sticker_set_name) Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
||||
* @method bool deleteChatStickerSet(string|int $chat_id) Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
|
||||
* @method Sticker[] getForumTopicIconStickers() Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an array of Sticker objects.
|
||||
* @method ForumTopic createForumTopic(string|int $chat_id, string $name, int $icon_color = null, string $icon_custom_emoji_id = null) Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
|
||||
* @method bool editForumTopic(string|int $chat_id, int $message_thread_id, string $name = null, string $icon_custom_emoji_id = null) Use this method to edit the name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
* @method ForumTopic createForumTopic(string|int $chat_id, string $name, ?int $icon_color=null, ?string $icon_custom_emoji_id=null) Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object.
|
||||
* @method bool editForumTopic(string|int $chat_id, int $message_thread_id, ?string $name=null, ?string $icon_custom_emoji_id=null) Use this method to edit the name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
* @method bool closeForumTopic(string|int $chat_id, int $message_thread_id) Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
* @method bool reopenForumTopic(string|int $chat_id, int $message_thread_id) Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
|
||||
* @method bool deleteForumTopic(string|int $chat_id, int $message_thread_id) Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
|
||||
|
@ -141,17 +141,17 @@
|
|||
* @method bool hideGeneralForumTopic(string|int $chat_id) Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.
|
||||
* @method bool unhideGeneralForumTopic(string|int $chat_id) Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
|
||||
* @method bool unpinAllGeneralForumTopicMessages(string|int $chat_id) Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success.
|
||||
* @method bool answerCallbackQuery(string $callback_query_id, string $text = null, bool $show_alert = false, string $url = null, int $cache_time = 0) Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned. Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
|
||||
* @method bool answerCallbackQuery(string $callback_query_id, ?string $text=null, ?bool $show_alert=false, ?string $url=null, ?int $cache_time=null) Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned. Alternatively, the user can be redirected to the specified Game URL. For this option to work, you must first create a game for your bot via @BotFather and accept the terms. Otherwise, you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter.
|
||||
* @method UserChatBoosts getUserChatBoosts(string|int $chat_id, int $user_id) Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
|
||||
* @method BusinessConnection getBusinessConnection(string $business_connection_id) Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
|
||||
* @method bool setMyCommands(array $commands, BotCommandScope $scope=null, string $language_code=null) Use this method to change the list of the bot's commands. Returns True on success.
|
||||
* @method bool deleteMyCommands(BotCommandScope $scope = null, string $language_code = null) Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
|
||||
* @method BotCommand[] getMyCommands(BotCommandScope $scope = null, string $language_code = "") Use this method to get the current list of the bot's commands for the given scope and user language. Returns an array of BotCommand objects. If commands aren't set, an empty list is returned.
|
||||
* @method bool setMyName(string $name = "", string $language_code = "") Use this method to change the bot's name. Returns True on success.
|
||||
* @method bool setMyCommands(array $commands, ?BotCommandScope $scope=null, ?string $language_code=null) Use this method to change the list of the bot's commands. Returns True on success.
|
||||
* @method bool deleteMyCommands(?BotCommandScope $scope=null, ?string $language_code=null) Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
|
||||
* @method BotCommand[] getMyCommands(?BotCommandScope $scope=null, ?string $language_code=null) Use this method to get the current list of the bot's commands for the given scope and user language. Returns an array of BotCommand objects. If commands aren't set, an empty list is returned.
|
||||
* @method bool setMyName(?string $name=null, ?string $language_code=null) Use this method to change the bot's name. Returns True on success.
|
||||
* @method BotName getMyName(string $language_code) Use this method to get the current bot name for the given user language. Returns BotName on success.
|
||||
* @method bool setMyDescription(?string $description=null, ?string $language_code=null) Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success.
|
||||
* @method BotDescription getMyDescription(?string $language_code=null) Use this method to get the current bot description for the given user language. Returns BotDescription on success.
|
||||
* @method bool setMyShortDescription(string $short_description , string $language_code = "") Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.
|
||||
* @method bool setMyShortDescription(string $short_description, ?string $language_code=null) Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success.
|
||||
* @method BotShortDescription getMyShortDescription(string $language_code) Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.
|
||||
* @method bool setChatMenuButton(?int $chat_id=null, ?MenuButton $menu_button=null) Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success.
|
||||
* @method MenuButton getChatMenuButton(?int $chat_id=null) Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
|
||||
|
|
Loading…
Add table
Reference in a new issue