Last active
May 8, 2018 23:44
-
-
Save adover/09ce53e5107238caeee0c416c58d9540 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Slack = require('slack-node'); | |
const config = require('../config/config.json'); | |
const slack = new Slack(); | |
slack.setWebhook(config.slack); | |
class SlackController { | |
sendMessage(message) { | |
slack.webhook({ | |
channel: '#integration_logging', | |
username: 'integrationBot', | |
text: `${message}\n------------------`, | |
}, (err, res) => { | |
// console.log(res); | |
}); | |
} | |
} | |
module.exports = new SlackController(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment