Guest User

Untitled

a guest
Mar 23rd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. <?php
  2.  
  3. use React\EventLoop\Factory;
  4. use BotMan\BotMan\BotManFactory;
  5. use BotMan\BotMan\Cache\ArrayCache;
  6. use BotMan\BotMan\Drivers\DriverManager;
  7. use BotMan\Drivers\Slack\SlackRTMDriver;
  8.  
  9. $loop = Factory::create();
  10.  
  11. // Do stuff with $loop
  12. $loop->addPeriodicTimer(60, function () use ($botman) {
  13. $timeout = 2.0;
  14. $botman->getClient()->checkConnection($timeout);
  15. });
  16.  
  17. DriverManager::loadDriver(SlackRTMDriver::class);
  18.  
  19. return BotManFactory::createForRTM($config, $loop, new ArrayCache());
Add Comment
Please, Sign In to add comment