From 2377b239f33bdaf7cfc22dc4550fdbddab801866 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 5 Nov 2024 19:26:16 -0500 Subject: [PATCH] Add UnbanChatMember method to TgBotLib --- src/TgBotLib/Enums/Methods.php | 3 +++ src/TgBotLib/Methods/UnbanChatMember.php | 34 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/TgBotLib/Methods/UnbanChatMember.php diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 285dd4b..011005c 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -36,6 +36,7 @@ use TgBotLib\Methods\SendVoice; use TgBotLib\Methods\SetMessageReaction; use TgBotLib\Methods\SetWebhook; + use TgBotLib\Methods\UnbanChatMember; enum Methods : string { @@ -70,6 +71,7 @@ case GET_USER_PROFILE_PHOTOS = 'getUserProfilePhotos'; case GET_FILE = 'getFile'; case BAN_CHAT_MEMBER = 'banChatMember'; + case UNBAN_CHAT_MEMBER = 'unbanChatMember'; /** * Executes a command on the provided bot with the given parameters. @@ -114,6 +116,7 @@ self::GET_USER_PROFILE_PHOTOS => GetUserProfilePhotos::execute($bot, $parameters), self::GET_FILE => GetFile::execute($bot, $parameters), self::BAN_CHAT_MEMBER => BanChatMember::execute($bot, $parameters), + self::UNBAN_CHAT_MEMBER => UnbanChatMember::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/UnbanChatMember.php b/src/TgBotLib/Methods/UnbanChatMember.php new file mode 100644 index 0000000..de22330 --- /dev/null +++ b/src/TgBotLib/Methods/UnbanChatMember.php @@ -0,0 +1,34 @@ +