serverless-slack icon indicating copy to clipboard operation
serverless-slack copied to clipboard

Revise sample code for serverless-slack

Open vboctor opened this issue 7 years ago • 1 comments

slack.on('*', (payload, bot, store) => {
  console.log( "star-event payload %s", JSON.stringify( payload ) );
});

// Slash Command handler
slack.on('/my-command', (payload, bot, store) => {
    ...
});

// Interactive Message handler
slack.on('greetings_click', (payload, bot, store) => {
    ...
});

// Reaction Added event handler
slack.on('reaction_added', (payload, bot, store) => {
    ...
});

And clarify the fact that developer can listen to event names thrown by serverless-slack or ones that are sent by slack. For example, slack-commands vs. /my-command. Referencing documentation for Slack event names would be useful as well.

vboctor avatar Dec 15 '17 19:12 vboctor

The approach for handling slack commands in readme seems out dated.

vboctor avatar Dec 15 '17 19:12 vboctor