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
POST
atstdlib
through 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
POST
atstdlib
through 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
POST
atstdlib
through here:https://<userid>.lib.id/<projectNameWithEnv>/events
- file name/path is an event name.
events/message/channel_join.js
is 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
lib
is the stdlib tool.commands
is to test slash command.vacation
is the command nametrust
is the first parameter which is user name-d
is to show logs in command line
lib .events.message trust general "hey" -d
lib
is the stdlib tool.events
is to test event command.message
is the event api nametrust
is the first parameter which is user namegeneral
is the second parameter which is channel"hey"
is the third parameter which is the message-d
is to show logs in command line