This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convo handlers are registered with unique strings | |
const handleGoodDay = 'handleGoodDay' | |
// handle any DM that starts with 'hi' | |
slapp.message('^hi', 'direct_message', (msg) => { | |
// Ask how they are and route next message to handleGoodDay handler | |
msg.say('Are you having a good day?').route(handleGoodDay) | |
}) | |
// register handleGoodDay handler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bb-slackaccesstoken // Slack user token for user who added your Slack App | |
bb-slackuserid // User Id of the user who added your Slack App | |
bb-slackbotaccesstoken // Bot access token if the app uses a bot | |
bb-slackbotuserid // User Id of bot user if the app uses a bot | |
bb-slackbotusername // Username of the bot user | |
bb-slackteamid // Slack team Id | |
bb-slackteamname // Slack team name | |
bb-slackteamdomain // Slack Domain name of the team |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const smb = require('slack-message-builder') | |
smb() | |
.text("Would you like to play a game?") | |
.attachment() | |
.text("Choose a game to play") | |
.fallback("You are unable to choose a game") | |
.callbackId("wopr_game") | |
.color("#3AA3E3") | |
.action() | |
.name("chess") |
OlderNewer