From 8e12707948a09e04dde7847efdb6467bd814e55e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 27 Apr 2023 15:55:10 +0200 Subject: [PATCH] Add windows notice --- docs | 2 +- examples/bot.php | 8 ++++---- src/Serialization.php | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs b/docs index c1148c944..c39338b2d 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit c1148c944af6f126ca28b926c5fef5a094dfe123 +Subproject commit c39338b2dab1bd347b5f1b2e30de8fc06518544a diff --git a/examples/bot.php b/examples/bot.php index 2a8b93939..1ab0cc2a0 100755 --- a/examples/bot.php +++ b/examples/bot.php @@ -108,6 +108,10 @@ class MyEventHandler extends EventHandler /** * Handle updates from users. * + * 100+ other types of onUpdate... method types are available, see https://docs.madelineproto.xyz/API_docs/types/Update.html for the full list. + * You can also use onAny to catch all update types (only for debugging) + * A special onUpdateCustomEvent method can also be defined, to send messages to the event handler from an API instance, using the sendCustomEvent method. + * * @param array $update Update */ public function onUpdateNewMessage(array $update): void @@ -181,10 +185,6 @@ class MyEventHandler extends EventHandler $this->logger($value); } } - - // 100+ other types of onUpdate... method types are available, see https://docs.madelineproto.xyz/API_docs/types/Update.html for the full list. - - // You can also use onAny to catch all update types (only for debugging) } $settings = new Settings; diff --git a/src/Serialization.php b/src/Serialization.php index 7fea6eacb..75cf5e75a 100644 --- a/src/Serialization.php +++ b/src/Serialization.php @@ -248,6 +248,9 @@ abstract class Serialization { for ($x = 0; $x < 60; $x++) { Logger::log('MadelineProto is starting, please wait...'); + if (\PHP_OS_FAMILY === 'Windows') { + Logger::log('For Windows users: please switch to Linux if this fails.'); + } try { \clearstatcache(true, $ipcPath); $socket = connect($ipcPath);