diff --git a/src/MadelineProtoExtensions/ApiExtensions.php b/src/MadelineProtoExtensions/ApiExtensions.php index 19b5e97..9318c8d 100644 --- a/src/MadelineProtoExtensions/ApiExtensions.php +++ b/src/MadelineProtoExtensions/ApiExtensions.php @@ -486,9 +486,9 @@ class ApiExtensions }); } - public function setEventHandler(): void + public function setEventHandler(): Promise { - $this->madelineProto->setEventHandler(EventHandler::class); + return call(fn() => yield $this->madelineProto->setEventHandler(EventHandler::class)); } } \ No newline at end of file