Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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());
Add Comment
Please, Sign In to add comment