Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 1011 Bytes

README.md

File metadata and controls

17 lines (15 loc) · 1011 Bytes

Hyvinvointibot

Hyvinvointibot is a Telegram bot based on telepot that was used in the 2018 well-being competition (hyvinvointikilpailu) of the Guild of Physics. It works by asking questions from users and storing the answers and associated good or bad scores into a MongoDB database.

Usage

  1. Install dependencies:
    sudo apt install mongodb
    sudo pip3 install pymongo telepot
    
    If you want to run the analysis script, you should also sudo pip3 install numpy matplotlib.
  2. git clone https://github.com/Fyysikkokilta/hyvinvointibot.git && cd hyvinvointibot.
  3. Put your bot token in token.txt in the root directory of the repo
  4. Check the competititon end date in hyvinvointibot.py
  5. Run the bot: python3 hyvinvointibot.py
  6. If you want to analyze the data in the database, run python3 dbmanager.py --export, update data_filename in analysis.py, and then run python3 analysis.py. Check the source code for details.