# wendy-twendy/strofkabot architecture

> Architecture diagram of the GitHub repository wendy-twendy/strofkabot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wendy-twendy/strofkabot
- Repository: https://github.com/wendy-twendy/strofkabot

## Overview

##### Project Type Analysis
This is a Discord bot application built using discord.py, focused on specific server functionality. The structure suggests a modular design with distinct features.

##### Main Components

a. Core Bot Components:
- Separate modules for each feature:
- Message Filter Module
- Llumi Module (message retrieval)
- User Stats Module
- Artan Quotes Module

b. External Services:
- Discord API Integration
- Discord Server (Strofka Server)

c. Data Storage:
- YAML Storage (for artan_quotes)
- Discord Database Interface

##### Middle Level
- Feature modules around it in a circular or grid pattern
- Blue: Core functionality
- Green: Data processing modules
- Yellow: User interaction modules

##### Bottom Level
- Data storage components
- Connections to relevant modules

##### Specific Implementation Details

Use these symbols and connections:
- Rectangles: For processing modules
- Clouds: For external services

##### Key Relationships to Highlight

- Discord API ↔️ Bot Core: Event handling and responses
- Bot Core ↔️ Feature Modules: Command routing
- Feature Modules ↔️ Storage: Data persistence
- Message Filter ↔️ User Messages: Content processing

## Diagram (Mermaid)

```mermaid
graph TB
    %% External Services
    subgraph External
        DAPI[Discord API]
        DS[Discord Server]
    end

    %% Bot Core
    BC[Strofka Bot Core]:::core

    %% Feature Modules
    subgraph Modules
        direction TB
        MF["Message Filter Module"]:::module
        LM["Llumi Module"]:::module
        US["User Stats Module"]:::module
        AQ["Artan Quotes Module"]:::module
    end

    %% Data Storage
    subgraph Storage
        direction TB
        DDB[(Discord DB)]:::storage
        YAML[(YAML Storage)]:::storage
    end

    %% Testing Components
    subgraph Tests
        direction TB
        MFT["Message Filter Tests"]:::test
        AQT["Artan Quotes Tests"]:::test
    end

    %% Utility
    UTIL["Utility Functions"]:::util

    %% Relationships
    DAPI <--> BC
    DS <--> BC
    BC --> MF
    BC --> LM
    BC --> US
    BC --> AQ
    MF --> DDB
    US --> DDB
    AQ --> YAML
    MF -.-> MFT
    AQ -.-> AQT
    MF --> UTIL
    LM --> UTIL
    US --> UTIL
    AQ --> UTIL

    %% Click Events
    click MF "https://github.com/wendy-twendy/strofkabot/blob/main/strofkabot/message_filter.py"
    click LM "https://github.com/wendy-twendy/strofkabot/blob/main/strofkabot/llumi.py"
    click US "https://github.com/wendy-twendy/strofkabot/blob/main/strofkabot/user_stats.py"
    click AQ "https://github.com/wendy-twendy/strofkabot/blob/main/strofkabot/artan_quotes.py"
    click DDB "https://github.com/wendy-twendy/strofkabot/blob/main/strofkabot/discord_db.py"
    click YAML "https://github.com/wendy-twendy/strofkabot/blob/main/data/artan_quotes.yaml"
    click MFT "https://github.com/wendy-twendy/strofkabot/blob/main/tests/test_message_filter.py"
    click AQT "https://github.com/wendy-twendy/strofkabot/blob/main/tests/test_artan.py"
    click UTIL "https://github.com/wendy-twendy/strofkabot/blob/main/strofkabot/utils.py"

    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef module fill:#2ecc71,stroke:#27ae60,color:white
    classDef storage fill:#e74c3c,stroke:#c0392b,color:white
    classDef test fill:#f1c40f,stroke:#f39c12,color:black
    classDef util fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        L1[Core Component]:::core
        L2[Feature Module]:::module
        L3[(Storage)]:::storage
        L4[Test Component]:::test
        L5[Utility]:::util
    end
```
