1 | /**
|
2 | * Example for creating and working with the Slack RTM API.
|
3 | */
|
4 |
|
5 | /* eslint no-console:0 */
|
6 |
|
7 | var RtmClient = require('../lib/clients/rtm/client');
|
8 |
|
9 | var token = process.env.SLACK_API_TOKEN || '';
|
10 |
|
11 | var rtm = new RtmClient(token, { logLevel: 'debug' });
|
12 | rtm.start();
|
13 |
|
14 | rtm.on('message', function handleRtmMessage(message) {
|
15 | console.log(message);
|
16 | });
|