All Projects → humanmade → Slackbot

humanmade / Slackbot

Licence: other
No description, website, or topics provided.

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].