Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

slackwatch

Run some commands or hit some URLs when DMed on Slack

GoDoc

Create a .slackwatch config file in your home directory. See config.json for an example. If a URL is specified, the presence of a Body determines an HTTP GET or POST.

   {
     "SlackToken": "xoxp-123-543",
     "WatchedChannels": [
       "SuperImportant"
     ],
     "Actions": [
       { "Command": "/usr/bin/afplay", "Args": "klaxon.wav" },
       {
         "URL": "https://hassio.local/api/services/homeassistant/turn_on?api_password=letmein",
         "Body": "{\"entity_id\":\"switch.bat_signal\"}",
         "ContentType": "application/javascript"
       }
     ]
   }

Alternatively, you can create your own actions to preform that conform to the Action interface and pass your config to the slackwatch.New constructor.

klaxon.wav is a public domain recording provided by the US Navy.

About

Run some commands or hit some URLs when DMed on Slack

Topics

Resources

License

Packages

No packages published