Skip to content

ThatKalle/slack-slash-command-PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-slash-command-PHP

Want to run the Slack Slash Commands in a no hassle PHP environment?

Installing

Follow Slacks instuctions as to get an App up and running who'll perform your slash commands.

Deploy the 'bot' to, well, any PHP enabled webhost, the version of PHP needed will depend on what functions you decide to use. Go for atleast 5.4+.

sudo apt-get install git wget -y
git clone https://github.com/ThatKalle/slack-slash-command-PHP.git
cp -r slack-slash-command-PHP/. /var/www/public_html

You'll also have to update the $valid_tokens array in config.php with your own Verification Token provided by Slack when creating your App. link.
You can add multiple keys to authenticate the same bot to multiple Slacks for example.

Create a new Slash Command in Slack and point it to the .php file, for example https://FQDN/template to use template.php.

Examples

/marvin lunch will provide a list of local lunch restaurants, as well as a bonus on fridays! - marvin.php

marvin

/at T12341212.1234 will provide handy links to open the corresponding Ticket or Task in Autotask PSA. - at.php

at

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone who's code was used
  • imlinus

About

Drive Slack slash commands with PHP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages