Git Product home page Git Product logo

slack-higgins's Introduction

higgins

A Slackbot for my personal slack. List of Custom Integrations, Command List

Add a new command

  1. Head here and fill out the info
  2. The url is http://slack-higgins.herokuapp.com/[YOUR COMMAND], eg. http://slack-higgins.herokuapp.com/coolcmd
  3. Give it whatever name and Icon you like
  4. Hit "Save Integration"!
  5. Create a new file in the cmds folder named [YOUR COMMAND].cmd.js, eg. coolcmd.cmd.js
  6. 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

Add a new bot

  1. Create a new file in the bots folder named [YOUR BOT].bot.js, eg. testbot9000.bot.js
  2. 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 use reply and react.
    • 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.

Resources

msg formatting attachements

slack-higgins's People

Contributors

chrishowlett avatar christiefelker avatar dependabot[bot] avatar ekmccann avatar gregleaver avatar jmtyler avatar ktrain avatar meggeroni avatar mimosacb avatar scott-tolksdorf avatar stolksdorf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.