Finalize API

This commit is contained in:
Daniil Gentili 2020-02-26 15:21:56 +01:00
parent 648b0a1250
commit 8792a4fe6a
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
1 changed files with 2 additions and 2 deletions

View File

@ -173,10 +173,10 @@ foreach ([
'user2.madeline' => 'Userbot login (2)'
] as $session => $message) {
Logger::log($message, Logger::WARNING);
$MadelineProtos []= (new API($session))->startAndLoopBackground(MyEventHandler::class);
$MadelineProtos []= new API($session);
}
Tools::wait(Tools::all($MadelineProtos));
API::startAndLoopMulti($MadelineProtos, MyEventHandler::class);
```
This will create an event handler class `EventHandler`, create a **combined** MadelineProto session with session files `bot.madeline`, `user.madeline`, `user2.madeline`, and set the event handler class to our newly created event handler.