# smolteu/discord-pterodactyl-controller architecture

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

- Interactive diagram: https://gitdiagram.com/smolteu/discord-pterodactyl-controller
- Repository: https://github.com/smolteu/discord-pterodactyl-controller

## Overview

A small Discord bot lets users start or stop a Minecraft server through Pterodactyl. The runtime loads the manager cog; its slash commands send power requests and report the outcome to the user. Source excerpts show the command and API behavior; the README documents the server-management purpose.

Main entry points: [`cogs/manager.py`](https://github.com/smolteu/discord-pterodactyl-controller/blob/main/cogs/manager.py) (Power commands), [`main.py`](https://github.com/smolteu/discord-pterodactyl-controller/blob/main/main.py) (Bot startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_main["Bot startup<br/>[main.py]"]
end

subgraph group_control["Server control"]
  node_manager["Power commands<br/>[manager.py]"]
  node_api["Pterodactyl API"]
  node_server["Minecraft server"]
end

node_user(("Discord user"))

node_main -->|"loads cog"| node_manager
node_user -->|"invokes slash command"| node_manager
node_manager -->|"sends power request"| node_api
node_manager -->|"reports outcome"| node_user
node_api -->|"controls power"| node_server

click node_main "https://github.com/smolteu/discord-pterodactyl-controller/blob/main/main.py"
click node_manager "https://github.com/smolteu/discord-pterodactyl-controller/blob/main/cogs/manager.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_main,node_user toneBlue
class node_manager,node_api,node_server toneAmber
```

## Components

### Bot runtime

- [Bot startup](https://github.com/smolteu/discord-pterodactyl-controller/blob/main/main.py): `main.py`

### Server control

- [Power commands](https://github.com/smolteu/discord-pterodactyl-controller/blob/main/cogs/manager.py): `cogs/manager.py`
- **Pterodactyl API**
- **Minecraft server**

### Other components

- **Discord user**

## Connections

- Bot startup → Power commands: loads cog (evidence: `main.py`)
- Discord user → Power commands: invokes slash command (evidence: `cogs/manager.py`)
- Power commands → Pterodactyl API: sends power request (evidence: `cogs/manager.py`)
- Power commands → Discord user: reports outcome (evidence: `cogs/manager.py`)
- Pterodactyl API → Minecraft server: controls power (evidence: `README.md`)
