Created
March 14, 2018 13:49
-
-
Save mpociot/e0d3be6b84ac4664a40c8c4b9810b6cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use React\EventLoop\Factory; | |
| use BotMan\BotMan\BotManFactory; | |
| use BotMan\BotMan\Cache\ArrayCache; | |
| use BotMan\BotMan\Drivers\DriverManager; | |
| use BotMan\Drivers\Slack\SlackRTMDriver; | |
| $loop = Factory::create(); | |
| // Do stuff with $loop | |
| $loop->addPeriodicTimer(60, function () use ($botman) { | |
| $timeout = 2.0; | |
| $botman->getClient()->checkConnection($timeout); | |
| }); | |
| DriverManager::loadDriver(SlackRTMDriver::class); | |
| return BotManFactory::createForRTM($config, $loop, new ArrayCache()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment