TravBots / hammer_tracker

0 stars 1 forks source link

Travstat Bot & Dashboard

A Discord bot and web dashboard for tracking and analyzing Travian game data. The project consists of two main components:

Features

Discord Bot

Web Dashboard

Installation

Prerequisites

Bot Setup

  1. Clone the repository
  2. Run the setup script with your Discord bot token:
# This will:
# -- Create necessary database directories
# -- Create config.ini with your bot token
# -- Set up the database structure

./setup.sh YOUR_DISCORD_BOT_TOKEN
  1. Create virtual environment and install dependencies:
# This will:
# -- Create a new virtual environment
# -- Install all required dependencies
# -- Clean any existing caches/temporary files

cd bot
make reset

Dashboard Setup

  1. Navigate to the site directory
  2. Install dashboard dependencies:
pip install -r site/requirements.txt
  1. Start the dashboard:
python site/app.py

Bot Commands

Defense Commands

Tracker Commands

Admin Commands

Permissions

The bot uses a role-based permission system:

Database Structure

The project uses two types of databases:

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

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

Acknowledgments

Development Commands

All commands must be run from the bot directory.

Run Tests

make test

Runs pytest for all tests in the test/ directory.

Run Development Mode

make dev

Runs the bot in development mode.

Code Formatting and Linting

make format  # Format code using ruff
make lint    # Run linting checks

Clean Environment

make reset   # Clean and recreate virtual environment