Slack has changed incoming webhooks URL's, therefore, I would replace:
url = 'https://' + options.domain + '.slack.com/services/hooks/incoming-webhook?token=' + options.token,
by
url = options.endpoint ? options.endpoint : 'https://' + options.domain + '.slack.com/services/hooks/incoming-webhook?token=' + options.token,
To allow flexibility between every kind of endpoints ;)
Slack has changed incoming webhooks URL's, therefore, I would replace:
by
To allow flexibility between every kind of endpoints ;)