protected function initClient()
    {
        //get slack config
        $slack_config = config('slack-output');

        if (empty( $slack_config["endpoint"] )) {
            throw new Exception("The endpoint url is not set in the config");
        }

        //init client
        $this->client = new Client($slack_config["endpoint"], [
            "username" => $slack_config["username"],
            "icon"     => $slack_config["icon"]
        ]);
    }