# willkoman/diskami architecture

> Architecture diagram of the GitHub repository willkoman/diskami, 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/willkoman/diskami
- Repository: https://github.com/willkoman/diskami

## Overview

##### Main Components

a) Client Layer:
- Discord API Interface
- Command Handler (CommandHandlingService)
- Bot Entry Point (Program.cs)

b) Module Layer:
- Audio Module
- Info Module

c) Service Layer:
- Music Service
- NHentai Service
- Picture Service
- YouTube Service

d) External Services:
- Discord API
- YouTube API
- Image Services
- NHentai API

##### Specific Elements

a) Components:
- Rectangle: Main application components
- Rounded rectangles: External services
- Hexagons: Command modules

b) Connections:

##### Additional Details

- Component types
- Any abbreviations used

##### Flow Representation

Main command flow:

##### Important Notes

- Command handling flow as it's central to the bot's operation
- Clear separation between modules and services
- Which services are used by which modules

This architecture represents a typical Discord.NET bot structure with clear separation of concerns between modules (command implementations) and services (business logic and external integrations).

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph External
        DiscordAPI["Discord API"]:::external
        YoutubeAPI["YouTube API"]:::external
        ImageAPI["Image Services"]:::external
        NHentaiAPI["NHentai API"]:::external
    end

    subgraph Client
        Program["Program.cs"]:::core
        DiscordInterface["Discord Interface"]:::core
        CommandHandler["Command Handler"]:::core
    end

    subgraph Modules
        AudioMod["Audio Module"]:::module
        InfoMod["Info Module"]:::module
    end

    subgraph Services
        MusicSvc["Music Service"]:::service
        NHentaiSvc["NHentai Service"]:::service
        PictureSvc["Picture Service"]:::service
        YoutubeSvc["YouTube Service"]:::service
    end

    %% Connections
    DiscordAPI <--> DiscordInterface
    DiscordInterface --> CommandHandler
    CommandHandler --> AudioMod & InfoMod
    
    AudioMod --> MusicSvc
    AudioMod --> YoutubeSvc
    InfoMod --> PictureSvc
    InfoMod --> NHentaiSvc
    
    MusicSvc --> YoutubeAPI
    YoutubeSvc --> YoutubeAPI
    PictureSvc --> ImageAPI
    NHentaiSvc --> NHentaiAPI

    Program --> DiscordInterface

    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef module fill:#f1c40f,stroke:#f39c12,color:black
    classDef service fill:#2ecc71,stroke:#27ae60,color:white
    classDef external fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Click Events
    click Program "https://github.com/willkoman/Diskami/blob/master/DisKami/Program.cs"
    click DiscordInterface "https://github.com/willkoman/Diskami/blob/master/DisKami/DisKami.cs"
    click CommandHandler "https://github.com/willkoman/Diskami/blob/master/DisKami/Services/CommandHandlingService.cs"
    click AudioMod "https://github.com/willkoman/Diskami/blob/master/DisKami/Modules/AudioModule.cs"
    click InfoMod "https://github.com/willkoman/Diskami/blob/master/DisKami/Modules/InfoModule.cs"
    click MusicSvc "https://github.com/willkoman/Diskami/blob/master/DisKami/Services/MusicService.cs"
    click NHentaiSvc "https://github.com/willkoman/Diskami/blob/master/DisKami/Services/NHentaiService.cs"
    click PictureSvc "https://github.com/willkoman/Diskami/blob/master/DisKami/Services/PictureService.cs"
    click YoutubeSvc "https://github.com/willkoman/Diskami/blob/master/DisKami/Services/YoutubeService.cs"
```
