diff --git a/src/TgBotLib/Enums/Methods.php b/src/TgBotLib/Enums/Methods.php index f604ee1..f323fff 100644 --- a/src/TgBotLib/Enums/Methods.php +++ b/src/TgBotLib/Enums/Methods.php @@ -8,6 +8,7 @@ use TgBotLib\Methods\Close; use TgBotLib\Methods\CopyMessage; use TgBotLib\Methods\CopyMessages; + use TgBotLib\Methods\DeleteWebhook; use TgBotLib\Methods\ForwardMessage; use TgBotLib\Methods\ForwardMessages; use TgBotLib\Methods\GetMe; @@ -58,6 +59,7 @@ case SEND_POLL = 'sendPoll'; case SEND_DICE = 'sendDice'; case SEND_CHAT_ACTION = 'sendChatAction'; + case DELETE_WEBHOOK = 'deleteWebhook'; /** * Executes a command on the provided bot with the given parameters. @@ -95,7 +97,8 @@ self::SEND_CONTACT => SendContact::execute($bot, $parameters), self::SEND_POLL => SendPoll::execute($bot, $parameters), self::SEND_DICE => SendDice::execute($bot, $parameters), - self::SEND_CHAT_ACTION => SendChatAction::execute($bot, $parameters) + self::SEND_CHAT_ACTION => SendChatAction::execute($bot, $parameters), + self::DELETE_WEBHOOK => DeleteWebhook::execute($bot, $parameters), }; } } diff --git a/src/TgBotLib/Methods/DeleteWebhook.php b/src/TgBotLib/Methods/DeleteWebhook.php new file mode 100644 index 0000000..affce6c --- /dev/null +++ b/src/TgBotLib/Methods/DeleteWebhook.php @@ -0,0 +1,36 @@ +value, $parameters)); + } + + /** + * @inheritDoc + */ + public static function getRequiredParameters(): ?array + { + return null; + } + + /** + * @inheritDoc + */ + public static function getOptionalParameters(): ?array + { + return [ + 'drop_pending_updates' + ]; + } + } \ No newline at end of file