# enkoki/mamon architecture

> Architecture diagram of the GitHub repository enkoki/mamon, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enkoki/mamon
- Repository: https://github.com/enkoki/mamon

## Overview

Mamon is a learning-oriented Discord bot. Users invoke slash commands through Discord; the bot starts and loads command cogs, which provide help, information, repository details, and moderation actions. Moderation delegates permission-hierarchy checks and response-embed creation to shared utilities, while information commands use uptime tracking. The README documents the command capabilities; runtime dispatch details beyond cog loading are not shown in the excerpts.

Main entry points: [`main.py`](https://github.com/enkoki/mamon/blob/main/main.py) (Bot Startup), [`cogs/info.py`](https://github.com/enkoki/mamon/blob/main/cogs/info.py) (Info Commands), [`cogs/moderation.py`](https://github.com/enkoki/mamon/blob/main/cogs/moderation.py) (Moderation Commands), [`cogs/github.py`](https://github.com/enkoki/mamon/blob/main/cogs/github.py) (Repository Command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot Runtime"]
  node_bot["Bot Startup<br/>[main.py]"]
end

subgraph group_commands["Command Features"]
  node_help["Help Commands<br/>[help.py]"]
  node_github["Repository Command<br/>[github.py]"]
  node_info["Info Commands<br/>[info.py]"]
  node_moderation["Moderation Commands<br/>[moderation.py]"]
end

subgraph group_shared["Shared Logic"]
  node_uptime["Uptime Tracker<br/>[uptime.py]"]
  node_checks["Action Checks<br/>[checks.py]"]
  node_embeds["Response Embeds<br/>[embed.py]"]
end

subgraph group_configuration["Configuration"]
  node_config["Environment Config<br/>[config.py]"]
  node_settings["Bot Constants<br/>[settings.py]"]
end

node_user(("Discord User"))
node_discord{{"Discord Platform"}}

node_user -->|"invokes commands"| node_discord
node_discord -.->|"delivers interactions"| node_bot
node_bot -->|"loads settings"| node_config
node_bot -->|"loads cog"| node_help
node_bot -->|"loads cog"| node_github
node_bot -->|"loads cog"| node_info
node_bot -->|"loads cog"| node_moderation
node_help -->|"reads constants"| node_settings
node_github -->|"reads config"| node_config
node_github -->|"replies with embed"| node_discord
node_info -->|"reads config"| node_config
node_info -->|"reads constants"| node_settings
node_info -->|"gets uptime"| node_uptime
node_info -->|"replies with embeds"| node_discord
node_moderation -->|"checks hierarchy"| node_checks
node_moderation -->|"builds responses"| node_embeds
node_moderation -->|"moderates members"| node_discord

click node_bot "https://github.com/enkoki/mamon/blob/main/main.py"
click node_config "https://github.com/enkoki/mamon/blob/main/config.py"
click node_settings "https://github.com/enkoki/mamon/blob/main/settings.py"
click node_help "https://github.com/enkoki/mamon/blob/main/cogs/help.py"
click node_github "https://github.com/enkoki/mamon/blob/main/cogs/github.py"
click node_info "https://github.com/enkoki/mamon/blob/main/cogs/info.py"
click node_moderation "https://github.com/enkoki/mamon/blob/main/cogs/moderation.py"
click node_uptime "https://github.com/enkoki/mamon/blob/main/core/uptime.py"
click node_checks "https://github.com/enkoki/mamon/blob/main/utils/checks.py"
click node_embeds "https://github.com/enkoki/mamon/blob/main/utils/embed.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bot,node_user toneBlue
class node_help,node_github,node_info,node_moderation toneAmber
class node_uptime,node_checks,node_embeds toneMint
class node_config,node_settings toneRose
class node_discord toneIndigo
```

## Components

### Bot Runtime

- [Bot Startup](https://github.com/enkoki/mamon/blob/main/main.py): `main.py`

### Command Features

- [Help Commands](https://github.com/enkoki/mamon/blob/main/cogs/help.py): `cogs/help.py`
- [Repository Command](https://github.com/enkoki/mamon/blob/main/cogs/github.py): `cogs/github.py`
- [Info Commands](https://github.com/enkoki/mamon/blob/main/cogs/info.py): `cogs/info.py`
- [Moderation Commands](https://github.com/enkoki/mamon/blob/main/cogs/moderation.py): `cogs/moderation.py`

### Shared Logic

- [Uptime Tracker](https://github.com/enkoki/mamon/blob/main/core/uptime.py): `core/uptime.py`
- [Action Checks](https://github.com/enkoki/mamon/blob/main/utils/checks.py): `utils/checks.py`
- [Response Embeds](https://github.com/enkoki/mamon/blob/main/utils/embed.py): `utils/embed.py`

### Configuration

- [Environment Config](https://github.com/enkoki/mamon/blob/main/config.py): `config.py`
- [Bot Constants](https://github.com/enkoki/mamon/blob/main/settings.py): `settings.py`

### Other components

- **Discord User**
- **Discord Platform**

## Connections

- Discord User → Discord Platform: invokes commands (evidence: `README.md`)
- Discord Platform → Bot Startup: delivers interactions
- Bot Startup → Environment Config: loads settings (evidence: `main.py`)
- Bot Startup → Help Commands: loads cog (evidence: `main.py`)
- Bot Startup → Repository Command: loads cog (evidence: `main.py`)
- Bot Startup → Info Commands: loads cog (evidence: `main.py`)
- Bot Startup → Moderation Commands: loads cog (evidence: `main.py`)
- Help Commands → Bot Constants: reads constants (evidence: `cogs/help.py`)
- Repository Command → Environment Config: reads config (evidence: `cogs/github.py`)
- Repository Command → Discord Platform: replies with embed (evidence: `cogs/github.py`)
- Info Commands → Environment Config: reads config (evidence: `cogs/info.py`)
- Info Commands → Bot Constants: reads constants (evidence: `cogs/info.py`)
- Info Commands → Uptime Tracker: gets uptime (evidence: `cogs/info.py`)
- Info Commands → Discord Platform: replies with embeds (evidence: `cogs/info.py`)
- Moderation Commands → Action Checks: checks hierarchy (evidence: `cogs/moderation.py`)
- Moderation Commands → Response Embeds: builds responses (evidence: `cogs/moderation.py`)
- Moderation Commands → Discord Platform: moderates members (evidence: `cogs/moderation.py`)
