functions
├── __main__.js
├── actions
│ ├── __main__.js
│ └── example.js
├── commands
│ ├── __main__.js
│ ├── hello.js
│ └── vacation.js
└── events
├── __main__.js
└── message
├── __main__.js
└── channel_join.js
- This is to handle your HTML web page.
- When you interact with a button or any element, it will callback to here.
- slack admin:
https://api.slack.com/apps/<uniqueAppId>/interactive-messages? - slack will
POSTatstdlibthrough here:https://<userid>.lib.id/<projectNameWithEnv>/actions - file name is action name, to call an action put the file name in the "name" field of action.
- Your slash command.
- slack admin:
https://api.slack.com/apps/<uniqueAppId>/slash-commands - slack will
POSTatstdlibthrough here:https://<userid>.lib.id/<projectNameWithEnv>/commands - file name is command. E.g., vacation.js is for
/vacation.
- E.g., When messages are sent to channel
- slack admin:
https://api.slack.com/apps/<uniqueAppId>/event-subscriptions - slack will
POSTatstdlibthrough here:https://<userid>.lib.id/<projectNameWithEnv>/events - file name/path is an event name.
events/message/channel_join.jsis for the eventmessage.channel.join.. (NOT SURE)
Here is how to test your codes using lib
parameter order (user, channel, text = '', event = {}, botToken = null, callback)
lib .commands.vacation trust -d
libis the stdlib tool.commandsis to test slash command.vacationis the command nametrustis the first parameter which is user name-dis to show logs in command line
lib .events.message trust general "hey" -d
libis the stdlib tool.eventsis to test event command.messageis the event api nametrustis the first parameter which is user namegeneralis the second parameter which is channel"hey"is the third parameter which is the message-dis to show logs in command line