/moneybot

๐Ÿค‘ a bot that reminds hackerspace users about to pay the monthly fee

Primary LanguagePythonOtherNOASSERTION

moneybot is a Slack bot that grabs donation stats and posts reminders to DM to pay monthly donation.

Now implemented

Pullers

  • โœ… Privat
  • ๐Ÿ”œ Monobank

Pushers

  • โœ… CSV
  • โœ… Slack
  • ๐Ÿ”œ GDrive

Configuration

Make sure you added a bot as a user goind through Slack Bot Users Guide.

General

โฑ๏ธ update_interval - how often should bot pull and push updates
๐Ÿ—„๏ธ db_prefix - what folder will DB be in
๐Ÿงป log_level - maximal level of log records
๐Ÿ’ต monthly_donate - how much money users should donate monthly

Slack

๐Ÿ“† general_date - a day when to post to #general
โฑ๏ธ general_time - a time when to post to #general ๐Ÿ“† private_date - a day when to post to DM
โฑ๏ธ private_time - a time when to post to DM

๐Ÿ“– general_text - a text for #general
๐Ÿ“– private_text - a text for DM

๐Ÿ“‹ members - a dictionary of Slack usernames and tokens (usually real names) which bot will be searching in descriptions of payments. Tokens should be space separated.

Installation

๐Ÿณ Docker

Install docker and then:

$ git clone https://github.com/dethoter/moneybot && cd moneybot
$ cp config.yml.template config.yml
$ docker build -t moneybot .
$ docker run -d --name moneybot --restart=unless-stopped -it -v $PWD:/app -v $PWD/data:/app/data moneybot

This Dockerfile from repo contains setup for RaspberryPi. You can modify FROM field in order to target your distro.

๐Ÿ’ป Locally

$ pip3 install -Ur requirements.txt
$ python3 ./app.py

License

see ./LICENSE