Skip to content

Commit

Permalink
Add windows notice
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Apr 27, 2023
1 parent 382cd3f commit 8e12707
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions examples/bot.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ public function onUpdateNewChannelMessage(array $update): void
/**
* 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
Expand Down Expand Up @@ -181,10 +185,6 @@ public function onUpdateNewMessage(array $update): void
$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;
Expand Down
3 changes: 3 additions & 0 deletions src/Serialization.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ public static function tryConnect(string $ipcPath, Future $cancelConnect, ?calla
{
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);
Expand Down

0 comments on commit 8e12707

Please sign in to comment.