1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 23:14:38 +01:00
This commit is contained in:
Daniil Gentili 2023-10-28 17:57:14 +02:00
parent 58cc30cbf6
commit 2e37ef8cd6
3 changed files with 3 additions and 11 deletions

2
docs

@ -1 +1 @@
Subproject commit 832a6d3cfe6e9790f00c0e65c7202e8e0fa6a553 Subproject commit 326dc6dee0cc0303db36c4bd5e74a241f8f9ad57

View File

@ -111,6 +111,7 @@ class MyEventHandler extends SimpleEventHandler
{ {
return [ return [
// Offers a /restart command to admins that can be used to restart the bot, applying changes. // 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 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. * Reposts a media file as a Telegram story.
*/ */

View File

@ -46,6 +46,7 @@ class MyEventHandler extends SimpleEventHandler
{ {
return [ return [
// Offers a /restart command to admins that can be used to restart the bot, applying changes. // 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 RestartPlugin::class
]; ];
} }