Skip to content

Simple bot for Slack that posts Chuck Norris facts at random in selected channel

Notifications You must be signed in to change notification settings

henkealg/ChuckNorrisSlackBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chuck Norris SlackBot

Simple Slack Bot for Slack.com that posts Chuck Norris facts at random in a selected channel.

Settings include how often Chuck should speak (silence him only if you dare) and in what channel.

Instructions

  • Navigate to Integrations on your Slack team
  • Find the Bot integration
  • Name the new bot Chuck Norris and click "Add Bot Integration"
  • Enter Chuck Norris as first and last name
  • Copy the API token from Slack to the $slackToken variable and set a slack channel in the norris class (norris.class.php)
  • Open goChuck.php and define the random number to match for Chuck to speak. Lower number = more facts.
  • And lastly, set up cron to execute goChuck.php at a desied inteval (every 5 mins during office hours is recommended)

You can test the bot by disabling the rand() generator in goChuck.php and run the file in your browser or in terminal.

Set $execLog to true to enable logging of responses from Slack to debug. exec.log must be writable.

Have fun!

About

Simple bot for Slack that posts Chuck Norris facts at random in selected channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages