@kairosis/slack-events
import { Badge } from ‘@astrojs/starlight/components’;
npm install @kairosis/slack-eventsEvent types
Section titled “Event types”| Constant | Routing key |
|---|---|
MESSAGE_RECEIVED | slack.message.received |
REACTION_ADDED | slack.reaction.added |
CHANNEL_JOINED | slack.channel.joined |
Payload schemas
Section titled “Payload schemas”SlackChannelJoinedPayload
Section titled “SlackChannelJoinedPayload”Used by: slack.channel.joined
| Field | Type | Required | Default |
|---|---|---|---|
teamId | string | Yes | — |
userId | string | Yes | — |
channelId | string | Yes | — |
SlackMessageReceivedPayload
Section titled “SlackMessageReceivedPayload”Used by: slack.message.received
| Field | Type | Required | Default |
|---|---|---|---|
teamId | string | Yes | — |
channelId | string | Yes | — |
userId | string | Yes | — |
text | string | Yes | — |
ts | string | Yes | — |
threadTs | string | No | — |
SlackReactionAddedPayload
Section titled “SlackReactionAddedPayload”Used by: slack.reaction.added
| Field | Type | Required | Default |
|---|---|---|---|
teamId | string | Yes | — |
userId | string | Yes | — |
reaction | string | Yes | — |
itemType | string | Yes | — |
channelId | string | No | — |
itemTs | string | Yes | — |