Skip to content

isabella232/Slackbot-2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slackbot

How to run

  1. Enable hm-slack first, then enable this plugin as well.

    (HM-Slack contains utilities, such as escaping functions.)

  2. Head over to your Slack integrations page, and create a new bot user.

    This will give you an API token, which you'll need in a second.

  3. For full features, you'll also need an Incoming Webhook integration, so set one of those up too.

  4. Configure hm-slackbot in your wp-config.php:

// Used for sending arbitrary messages from WP in hm-slack
define( 'HM_SLACK_INCOMING_URL', 'https://hooks.slack.com/services/your/incoming' );

// Slack bot token
define( 'HM_SLACK_BOT_TOKEN', 'my-bot-token' );

// GitHub integration token for issues
define( 'HM_SLACK_GITHUB_TOKEN', 'myexampletokenfromgithub' );

// Set up the bot's name
define( 'HM_SLACK_BOT_NAME', 'rmbot' );
define( 'HM_SLACK_BOT_ID',   'U03M7H4V5' );

// Set up bot admin (user ID)
define( 'HM_SLACK_BOT_ADMIN_ID', 'U03BWLTDD' );
  1. Run the bot
$ wp hm-slackbot run

Running Permanently

If you want to keep Slackbot running all the time, it's best to run it as a daemon. This will keep it running in the background.

To do this, simply add bin/start.sh to your system's cron, with an interval of every minute (* in the minute column). This will check every minute that the bot is still running.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.0%
  • Shell 2.0%