Seems commands __construct() is called during composer dump autoload
This commit is contained in:
parent
7ee2df607c
commit
1a5371a7b9
@ -28,15 +28,6 @@ class SlackSocketClient extends Command
|
|||||||
*/
|
*/
|
||||||
protected $description = 'Start SocketMode Client';
|
protected $description = 'Start SocketMode Client';
|
||||||
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
// Make sure our socket_token is defined
|
|
||||||
if (! config('slack.socket_token'))
|
|
||||||
throw new \Exception('SocketMode Client Token not defined.');
|
|
||||||
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
*
|
*
|
||||||
@ -45,6 +36,10 @@ class SlackSocketClient extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
// Make sure our socket_token is defined
|
||||||
|
if (! config('slack.socket_token'))
|
||||||
|
throw new \Exception('SocketMode Client Token not defined.');
|
||||||
|
|
||||||
$loop = Loop::get();
|
$loop = Loop::get();
|
||||||
|
|
||||||
$client = new SocketMode($loop);
|
$client = new SocketMode($loop);
|
||||||
|
Loading…
Reference in New Issue
Block a user