A slack app to exchange virtual money
Needs a Mongo database. Using docker, link name is "mongo" and port 27017.
- Deploy this somewhere accessible from outside. Docker will help a LOT, Dockerfile is provided and also build script for GKE / Kubernetes.
- Configure your Slack app commands to use it.
MONGO_ADDR
sets the mongo host name, default tomongo
LOG_LEVEL
sets the log level (uahey), default todebug
SLACK_TOKEN
sets the Slack slash-commands verification token, default tonull
and no check.
A "realm" is an abstraction for a team / world / organization. An "account" is a wallet. The "holder" is the owner of an account.
These URL are answering to Slack commands
/slack-api/bank
returns user account status (command:/bank
)/slack-api/pay
transfers money from one to another (command:/pay 100 @pluce
)/slack-api/forbes
returns a Top 10 of the realm account (command:/forbes
)
Feel free to file bugs or features. If you want to contribute, you can implement something and make a pull request.