A Slackbot for my personal slack. List of Custom Integrations, Command List
- Head here and fill out the info
- The url is
http://slack-higgins.herokuapp.com/[YOUR COMMAND]
, eg.http://slack-higgins.herokuapp.com/coolcmd
- Give it whatever name and Icon you like
- Hit "Save Integration"!
- Create a new file in the
cmds
folder named[YOUR COMMAND].cmd.js
, eg.coolcmd.cmd.js
- Follow this starting template
module.exports = {
url : '/coolcmd',
handle : function(msg, info, reply){
reply('Hello' + info.sender + ', you said ' + msg);
}
}
Commit your changes and LogBot will tell you when the server has restarted in the diagnostics
channel
- Create a new file in the
bots
folder named[YOUR BOT].bot.js
, eg.testbot9000.bot.js
- Follow this starting template
module.exports = {
name : 'AwesomeBot', //Optional
icon : ':robot_face:', //Optional
channel : '*', //Every channel, or listen in on a specific channel
handle : function(msg, info, Higgins){
Higgins.reply("Hey " + info.user)
}
}
Commit your changes and LogBot will tell you when the server has restarted in the diagnostics
channel
handle
is a function that takes 3 parameters.
msg
will be a string that is the message from the event (if there is one)info
will be an object with a bunch of data about the event.info.channel
,info.user
, etc.Higgins
will be your best friend. He has two functiosn you can usereply
andreact
.reply
takes a string for a message as your first parameter, and you can optionally give it a seocnd parameter of a channel or user to send the message to. It defaults to the channel the original event came from.react
takes a single argument of the name of an emoji to react to the event with.