Among other new features, the onStart async method can be used | MadelineProto | Official Channel
Among other new features, the onStart async method can be used to execute methods on bot startup (instead of calling $MadelineProto->loop() outside of the bot).