-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathslack.js
28 lines (25 loc) · 792 Bytes
/
slack.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Slack from 'node-slack';
import config from '../config';
export default class Slacker {
async run(message) {
var slack = new Slack(config.url);
return slack.send({
text: "Today's Menu:",
username: message.title,
attachments: [
{
"fallback": message.soup1 + ' & ' + message.soup2,
"title": "Soups",
"text": message.soup1 + '\n' + message.soup2,
"color": "#00bcd4"
},
{
"fallback": message.main1 + '\n' + message.main2 + '\n' + message.main3,
"title": "Mains",
"text": message.main1 + '\n' + message.main2 + '\n' + message.main3,
"color": "#1a0dab"
}
],
});
}
};