From ca194cfb52a8c0689ad258e8a9cab5615766cd60 Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 28 Nov 2024 00:35:20 -0500 Subject: [PATCH] Add methods to set and get default admin rights --- src/TgBotLib/Bot.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TgBotLib/Bot.php b/src/TgBotLib/Bot.php index 66202ca..87d7bb5 100644 --- a/src/TgBotLib/Bot.php +++ b/src/TgBotLib/Bot.php @@ -27,6 +27,7 @@ use TgBotLib\Objects\BotName; use TgBotLib\Objects\BotShortDescription; use TgBotLib\Objects\BusinessConnection; + use TgBotLib\Objects\ChatAdministratorRights; use TgBotLib\Objects\ChatFullInfo; use TgBotLib\Objects\ChatInviteLink; use TgBotLib\Objects\ChatMember; @@ -137,6 +138,8 @@ * @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. + * @method true setMyDefaultAdministratorRights(?ChatAdministratorRights $rights=null, ?bool $for_channels=false) Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success. + * @method ChatAdministratorRights getMyDefaultAdministratorRights(?bool $for_channels=false) Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. * @throws TelegramException if the method execution fails. */ class Bot