How to use the @slack/client.RTM_EVENTS.REACTION_REMOVED function in @slack/client

To help you get started, we’ve selected a few @slack/client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lvn / botstrap / lib / constants.js View on Github external
'star_removed': ['message'],
  'raw_message': ['message'],
  'presenceChange': ['user', 'presence'],
  'statusChange': ['user', 'status'],
  'message': ['message'],
  'channelMarked': ['channel', 'ts'],
  'userTyping': ['user', 'channel'],
  'userChange': ['user'],
  'botRemoved': ['bot'],
  'messageSent': ['message'],
  'throw': ['error']
};

// new style events
eventArgs[RTM_EVENTS.REACTION_ADDED] = ['reaction'];
eventArgs[RTM_EVENTS.REACTION_REMOVED] = ['reaction'];
eventArgs[RTM_EVENTS.MESSAGE] = ['message'];

exports.eventArgs = eventArgs;

exports.errMsgs = {
  'err_plugin_type': 'Plugin type {{type}} does not exist!',
  'err_token': 'No token found!'
};

exports.NotImplementedError = new Error('Not implemented');
github slackapi / node-slack-sdk / examples / example-rtm-client.js View on Github external
var RTM_EVENTS = require('@slack/client').RTM_EVENTS;

var token = process.env.SLACK_API_TOKEN || '';

var rtm = new RtmClient(token, { logLevel: 'debug' });
rtm.start();

rtm.on(RTM_EVENTS.MESSAGE, function handleRtmMessage(message) {
  console.log('Message:', message);
});

rtm.on(RTM_EVENTS.REACTION_ADDED, function handleRtmReactionAdded(reaction) {
  console.log('Reaction added:', reaction);
});

rtm.on(RTM_EVENTS.REACTION_REMOVED, function handleRtmReactionRemoved(reaction) {
  console.log('Reaction removed:', reaction);
});
github slackapi / node-slack-sdk / examples / example-rtm-client-datastore.js View on Github external
console.log('RTM client authenticated!');
});

rtm.on(RTM_EVENTS.MESSAGE, function handleRtmMessage(message) {
  console.log(
    'User %s posted a message in %s channel',
    rtm.dataStore.getUserById(message.user).name,
    rtm.dataStore.getChannelGroupOrDMById(message.channel).name
  );
});

rtm.on(RTM_EVENTS.REACTION_ADDED, function handleRtmReactionAdded(reaction) {
  console.log('Reaction added:', reaction);
});

rtm.on(RTM_EVENTS.REACTION_REMOVED, function handleRtmReactionRemoved(reaction) {
  console.log('Reaction removed:', reaction);
});