Finalize API
This commit is contained in:
parent
648b0a1250
commit
8792a4fe6a
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user