diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index 455190e..471dfac 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -6,6 +6,7 @@ use TgBotLib\Exceptions\TelegramException; use TgBotLib\Interfaces\ObjectTypeInterface; use TgBotLib\Methods\BanChatMember; + use TgBotLib\Methods\BanChatSenderChat; use TgBotLib\Methods\Close; use TgBotLib\Methods\CopyMessage; use TgBotLib\Methods\CopyMessages; @@ -78,6 +79,7 @@ case RESTRICT_CHAT_MEMBER = 'restrictChatMember'; case PROMOTE_CHAT_MEMBER = 'promoteChatMember'; case SET_CHAT_ADMINISTRATOR_CUSTOM_TITLE = 'setChatAdministratorCustomTitle'; + case BAN_CHAT_SENDER_CHAT = 'banChatSenderChat'; /** * Executes a command on the provided bot with the given parameters. @@ -126,6 +128,7 @@ self::RESTRICT_CHAT_MEMBER => RestrictChatMember::execute($bot, $parameters), self::PROMOTE_CHAT_MEMBER => PromoteChatMember::execute($bot, $parameters), self::SET_CHAT_ADMINISTRATOR_CUSTOM_TITLE => SetChatAdministratorCustomTitle::execute($bot, $parameters), + self::BAN_CHAT_SENDER_CHAT => BanChatSenderChat::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/BanChatSenderChat.php b/src/TgBotLib/Methods/BanChatSenderChat.php new file mode 100644 index 0000000..ddd27e2 --- /dev/null +++ b/src/TgBotLib/Methods/BanChatSenderChat.php @@ -0,0 +1,38 @@ +sendRequest(Methods::BAN_CHAT_SENDER_CHAT->value, $parameters); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return [ + 'chat_id', + 'sender_chat_id' + ]; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return null; + } + } \ No newline at end of file