# noobindahause/martin architecture

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

- Interactive diagram: https://gitdiagram.com/noobindahause/martin
- Repository: https://github.com/noobindahause/martin

## Overview

Martin is a modular Discord bot: users issue slash commands, which the bot’s command tree checks and routes to feature cogs; those cogs perform moderation or owner actions and respond through Discord. Moderation includes member actions, warnings, temporary bans, and mod-log configuration, with persistent records handled through a shared SQLite data manager. General commands provide bot information and latency checks, while owner commands manage cogs, settings, and the blacklist. The README documents these capabilities; unsampled modules are represented only where documented, without assuming their internal wiring.

Main entry points: [`Martin/bot.py`](https://github.com/noobindahause/martin/blob/master/Martin/bot.py) (Martin bot), [`Cogs/Moderation/moderation.py`](https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/moderation.py) (Moderation commands), [`Cogs/Owner/owner.py`](https://github.com/noobindahause/martin/blob/master/Cogs/Owner/owner.py) (Owner commands), [`Cogs/General/general.py`](https://github.com/noobindahause/martin/blob/master/Cogs/General/general.py) (General commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_entry["Application entry<br/>[main.py]"]
  node_bot["Martin bot<br/>[bot.py]"]
  node_settings["Settings<br/>[settings.py]"]
  node_tree["Slash command tree<br/>[tree.py]"]
end

subgraph group_commands["Command features"]
  node_general["General commands<br/>[general.py]"]
  node_owner["Owner commands<br/>[owner.py]"]
  node_owner_views["Owner controls<br/>[views.py]"]
end

subgraph group_moderation["Moderation"]
  node_moderation["Moderation commands<br/>[moderation.py]"]
  node_mod_objects["Moderation objects<br/>[objects.py]"]
  node_mod_utils["Moderation utilities<br/>[utils.py]"]
  node_mod_data["Moderation data access"]
end

subgraph group_shared["Shared services"]
  node_sqlite[("Cog SQLite files")]
  node_data_manager["SQLite data manager<br/>[data_manager.py]"]
  node_checks["Command checks<br/>[checks.py]"]
  node_formatting["Formatting helpers<br/>[formatting.py]"]
  node_transformers["Argument transformers<br/>[transformers.py]"]
  node_views["Interactive views<br/>[views.py]"]
end

node_user(("Discord user"))
node_discord{{"Discord platform"}}

node_entry -->|"loads settings"| node_settings
node_entry -->|"starts bot"| node_bot
node_bot -->|"reads and saves"| node_settings
node_bot -->|"connects to"| node_discord
node_bot -->|"configures tree"| node_tree
node_bot -->|"loads extension"| node_general
node_bot -->|"loads extension"| node_owner
node_bot -->|"loads extension"| node_moderation
node_user -->|"issues commands"| node_discord
node_discord -->|"delivers interactions"| node_tree
node_tree -->|"applies checks"| node_checks
node_tree -->|"checks blacklist"| node_bot
node_general -->|"replies to"| node_discord
node_general -->|"reads bot status"| node_bot
node_general -->|"uses views"| node_views
node_owner -->|"manages bot"| node_bot
node_owner -->|"opens controls"| node_owner_views
node_owner -->|"resolves users"| node_transformers
node_owner -->|"uses views"| node_views
node_owner -->|"replies to"| node_discord
node_moderation -->|"moderates members"| node_discord
node_moderation -->|"reads and writes"| node_mod_data
node_moderation -->|"uses objects"| node_mod_objects
node_moderation -->|"uses helpers"| node_mod_utils
node_moderation -->|"applies checks"| node_checks
node_moderation -->|"parses arguments"| node_transformers
node_moderation -->|"formats responses"| node_formatting
node_moderation -->|"uses views"| node_views
node_mod_data -->|"uses data access"| node_data_manager
node_data_manager -->|"reads and writes"| node_sqlite

click node_entry "https://github.com/noobindahause/martin/blob/master/main.py"
click node_bot "https://github.com/noobindahause/martin/blob/master/Martin/bot.py"
click node_settings "https://github.com/noobindahause/martin/blob/master/Martin/settings.py"
click node_tree "https://github.com/noobindahause/martin/blob/master/Martin/tree.py"
click node_general "https://github.com/noobindahause/martin/blob/master/Cogs/General/general.py"
click node_owner "https://github.com/noobindahause/martin/blob/master/Cogs/Owner/owner.py"
click node_owner_views "https://github.com/noobindahause/martin/blob/master/Cogs/Owner/views.py"
click node_moderation "https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/moderation.py"
click node_mod_objects "https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/objects.py"
click node_mod_utils "https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/utils.py"
click node_mod_data "https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/moderation_data_manager.py"
click node_sqlite "https://github.com/noobindahause/martin/tree/master/cogs_data"
click node_data_manager "https://github.com/noobindahause/martin/blob/master/Utilities/data_manager.py"
click node_checks "https://github.com/noobindahause/martin/blob/master/Utilities/checks.py"
click node_formatting "https://github.com/noobindahause/martin/blob/master/Utilities/formatting.py"
click node_transformers "https://github.com/noobindahause/martin/blob/master/Utilities/transformers.py"
click node_views "https://github.com/noobindahause/martin/blob/master/Utilities/views.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_entry,node_bot,node_settings,node_tree,node_user toneBlue
class node_general,node_owner,node_owner_views toneAmber
class node_moderation,node_mod_objects,node_mod_utils,node_mod_data toneMint
class node_sqlite,node_data_manager,node_checks,node_formatting,node_transformers,node_views toneRose
class node_discord toneIndigo
```

## Components

### Bot runtime

- [Application entry](https://github.com/noobindahause/martin/blob/master/main.py): `main.py`
- [Martin bot](https://github.com/noobindahause/martin/blob/master/Martin/bot.py): `Martin/bot.py`
- [Settings](https://github.com/noobindahause/martin/blob/master/Martin/settings.py): `Martin/settings.py`
- [Slash command tree](https://github.com/noobindahause/martin/blob/master/Martin/tree.py): `Martin/tree.py`

### Command features

- [General commands](https://github.com/noobindahause/martin/blob/master/Cogs/General/general.py): `Cogs/General/general.py`
- [Owner commands](https://github.com/noobindahause/martin/blob/master/Cogs/Owner/owner.py): `Cogs/Owner/owner.py`
- [Owner controls](https://github.com/noobindahause/martin/blob/master/Cogs/Owner/views.py): `Cogs/Owner/views.py`

### Moderation

- [Moderation commands](https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/moderation.py): `Cogs/Moderation/moderation.py`
- [Moderation objects](https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/objects.py): `Cogs/Moderation/objects.py`
- [Moderation utilities](https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/utils.py): `Cogs/Moderation/utils.py`
- [Moderation data access](https://github.com/noobindahause/martin/blob/master/Cogs/Moderation/moderation_data_manager.py): `Cogs/Moderation/moderation_data_manager.py`

### Shared services

- [Cog SQLite files](https://github.com/noobindahause/martin/tree/master/cogs_data): `cogs_data`
- [SQLite data manager](https://github.com/noobindahause/martin/blob/master/Utilities/data_manager.py): `Utilities/data_manager.py`
- [Command checks](https://github.com/noobindahause/martin/blob/master/Utilities/checks.py): `Utilities/checks.py`
- [Formatting helpers](https://github.com/noobindahause/martin/blob/master/Utilities/formatting.py): `Utilities/formatting.py`
- [Argument transformers](https://github.com/noobindahause/martin/blob/master/Utilities/transformers.py): `Utilities/transformers.py`
- [Interactive views](https://github.com/noobindahause/martin/blob/master/Utilities/views.py): `Utilities/views.py`

### Other components

- **Discord user**
- **Discord platform**

## Connections

- Application entry → Settings: loads settings
- Application entry → Martin bot: starts bot
- Martin bot → Settings: reads and saves
- Martin bot → Discord platform: connects to
- Martin bot → Slash command tree: configures tree
- Martin bot → General commands: loads extension
- Martin bot → Owner commands: loads extension
- Martin bot → Moderation commands: loads extension
- Discord user → Discord platform: issues commands
- Discord platform → Slash command tree: delivers interactions
- Slash command tree → Command checks: applies checks
- Slash command tree → Martin bot: checks blacklist
- General commands → Discord platform: replies to
- General commands → Martin bot: reads bot status
- General commands → Interactive views: uses views
- Owner commands → Martin bot: manages bot
- Owner commands → Owner controls: opens controls
- Owner commands → Argument transformers: resolves users
- Owner commands → Interactive views: uses views
- Owner commands → Discord platform: replies to
- Moderation commands → Discord platform: moderates members
- Moderation commands → Moderation data access: reads and writes
- Moderation commands → Moderation objects: uses objects
- Moderation commands → Moderation utilities: uses helpers
- Moderation commands → Command checks: applies checks
- Moderation commands → Argument transformers: parses arguments
- Moderation commands → Formatting helpers: formats responses
- Moderation commands → Interactive views: uses views
- Moderation data access → SQLite data manager: uses data access
- SQLite data manager → Cog SQLite files: reads and writes
