A Slack bot running in daemon mode with Amazon SQS integration.
Original version using Flask and Outgoing WebHooks integration by llimllib/slask.
- Clone this repo
pip install -r requirements.txt- Add the Amazon SQS integration on Slack
- Add the Incoming WebHooks integration on Slack
- Update config.py with your information (tokens,keys,botname,etc)
- Run
python bot.py start - That's it! Try typing
!echo Hello Worldinto any chat room
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt2123981740180",
"Effect": "Allow",
"Action": [
"sqs:*"
],
"Resource": [
"arn:aws:sqs:us-east-1:<account id>:<sqs queue name>"
]
}
]
}
You can also host your Bot for free on Heroku. It is ready to deploy.
heroku create
git push heroku master
heroku ps:scale worker=1
heroku ps
heroku logsRight now, !help, !echo, !gif, !image, !youtube and !wiki are the only available commands.
It's super easy to add your own commands! Just create a python file in the plugins directory with an on_message function that returns a string.
Besides commands you can also integrate other types of plugins that just listen for a specific message in the SQS queue.
See per example the stackdriver-reader plugin that wait for Stackdriver to send policy alerts to a SNS topic which is subscribed by the SQS queue used by this daemon.