diff --git a/docs b/docs index 832a6d3cf..326dc6dee 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 832a6d3cfe6e9790f00c0e65c7202e8e0fa6a553 +Subproject commit 326dc6dee0cc0303db36c4bd5e74a241f8f9ad57 diff --git a/examples/bot.php b/examples/bot.php index 740e490a5..1195b8a63 100755 --- a/examples/bot.php +++ b/examples/bot.php @@ -111,6 +111,7 @@ class MyEventHandler extends SimpleEventHandler { return [ // Offers a /restart command to admins that can be used to restart the bot, applying changes. + // Make sure to run in a bash while loop when running via CLI to allow self-restarts. RestartPlugin::class ]; } @@ -142,16 +143,6 @@ class MyEventHandler extends SimpleEventHandler } } - /** - * If the message is a /restart command from an admin, restart to reload changes to the event handler code. - */ - #[FilterCommand('restart')] - public function restartCommand(Incoming & Message & FromAdmin $message): void - { - // Make sure to run in a bash while loop when running via CLI to allow self-restarts. - $this->restart(); - } - /** * Reposts a media file as a Telegram story. */ diff --git a/examples/simpleBot.php b/examples/simpleBot.php index 72f48e5e9..bf169dfe5 100644 --- a/examples/simpleBot.php +++ b/examples/simpleBot.php @@ -46,6 +46,7 @@ class MyEventHandler extends SimpleEventHandler { return [ // Offers a /restart command to admins that can be used to restart the bot, applying changes. + // Make sure to run in a bash while loop when running via CLI to allow self-restarts. RestartPlugin::class ]; }