# el-reng/proyecto_2_nexa architecture

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

- Interactive diagram: https://gitdiagram.com/el-reng/proyecto_2_nexa
- Repository: https://github.com/el-reng/proyecto_2_nexa

## Overview

NEXA is a Discord assistant whose main workflow is: Discord messages reach the bot, keyword handling selects a response or reminder action, and the bot replies in the channel. Separately, startup launches loops for class, payment, and reminder notifications. The modular memory file holds keyword lists, user names, schedules, channel ID, and an in-process reminder list; it is not persistent storage. The README also describes broader automation and more natural interaction as goals, not implemented capabilities. Edges reflect the shown calls; no external database or other integration is evidenced.

Main entry points: [`main.py`](https://github.com/el-reng/proyecto_2_nexa/blob/main/main.py) (Bot lifecycle), [`memoria.py`](https://github.com/el-reng/proyecto_2_nexa/blob/main/memoria.py) (Bot reference data), [`comandos.py`](https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py) (Keyword responses)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot runtime"]
  node_bot["Bot lifecycle<br/>[main.py]"]
  node_message_router["Message router<br/>[main.py]"]
end

subgraph group_interaction["Message interaction"]
  node_keyword_responses["Keyword responses<br/>[comandos.py]"]
  node_reminder_entry["Reminder entry<br/>[comandos.py]"]
end

subgraph group_scheduling["Scheduled notices"]
  node_class_notices["Class notices<br/>[comandos.py]"]
  node_payment_notice["Payment notice<br/>[comandos.py]"]
  node_reminder_notices["Reminder notices<br/>[comandos.py]"]
end

subgraph group_state["In-memory data"]
  node_reminder_state["Reminder list<br/>[memoria.py]"]
  node_reference_data["Bot reference data<br/>[memoria.py]"]
end

node_discord_user(("Discord user"))
node_discord(("Discord platform"))

node_discord_user -->|"sends messages"| node_discord
node_discord -->|"delivers events"| node_message_router
node_message_router -->|"dispatches messages"| node_keyword_responses
node_message_router -->|"processes commands"| node_discord
node_keyword_responses -->|"reads keywords and users"| node_reference_data
node_keyword_responses -->|"dispatches reminder requests"| node_reminder_entry
node_keyword_responses -->|"sends replies"| node_discord
node_reminder_entry -->|"reads user names"| node_reference_data
node_reminder_entry -->|"appends reminders"| node_reminder_state
node_bot -->|"registers message handler"| node_message_router
node_bot -->|"starts task"| node_class_notices
node_bot -->|"starts task"| node_payment_notice
node_bot -->|"starts task"| node_reminder_notices
node_class_notices -->|"reads class schedule and channel"| node_reference_data
node_class_notices -->|"sends notices"| node_discord
node_payment_notice -->|"reads channel"| node_reference_data
node_payment_notice -->|"sends notice"| node_discord
node_reminder_notices -->|"reads channel"| node_reference_data
node_reminder_notices -->|"reads and removes due reminders"| node_reminder_state
node_reminder_notices -->|"sends reminders"| node_discord
node_bot -->|"connects and announces readiness"| node_discord

click node_bot "https://github.com/el-reng/proyecto_2_nexa/blob/main/main.py"
click node_message_router "https://github.com/el-reng/proyecto_2_nexa/blob/main/main.py"
click node_keyword_responses "https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py"
click node_reminder_entry "https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py"
click node_reminder_state "https://github.com/el-reng/proyecto_2_nexa/blob/main/memoria.py"
click node_reference_data "https://github.com/el-reng/proyecto_2_nexa/blob/main/memoria.py"
click node_class_notices "https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py"
click node_payment_notice "https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py"
click node_reminder_notices "https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.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_message_router,node_discord_user toneBlue
class node_keyword_responses,node_reminder_entry toneAmber
class node_class_notices,node_payment_notice,node_reminder_notices toneMint
class node_reminder_state,node_reference_data toneRose
class node_discord toneIndigo
```

## Components

### Bot runtime

- [Bot lifecycle](https://github.com/el-reng/proyecto_2_nexa/blob/main/main.py): `main.py`
- [Message router](https://github.com/el-reng/proyecto_2_nexa/blob/main/main.py): `main.py`

### Message interaction

- [Keyword responses](https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py): `comandos.py`
- [Reminder entry](https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py): `comandos.py`

### Scheduled notices

- [Class notices](https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py): `comandos.py`
- [Payment notice](https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py): `comandos.py`
- [Reminder notices](https://github.com/el-reng/proyecto_2_nexa/blob/main/comandos.py): `comandos.py`

### In-memory data

- [Reminder list](https://github.com/el-reng/proyecto_2_nexa/blob/main/memoria.py): `memoria.py`
- [Bot reference data](https://github.com/el-reng/proyecto_2_nexa/blob/main/memoria.py): `memoria.py`

### Other components

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

## Connections

- Discord user → Discord platform: sends messages
- Discord platform → Message router: delivers events (evidence: `main.py`)
- Message router → Keyword responses: dispatches messages (evidence: `main.py`)
- Message router → Discord platform: processes commands (evidence: `main.py`)
- Keyword responses → Bot reference data: reads keywords and users (evidence: `comandos.py`)
- Keyword responses → Reminder entry: dispatches reminder requests (evidence: `comandos.py`)
- Keyword responses → Discord platform: sends replies (evidence: `comandos.py`)
- Reminder entry → Bot reference data: reads user names (evidence: `comandos.py`)
- Reminder entry → Reminder list: appends reminders (evidence: `comandos.py`)
- Bot lifecycle → Message router: registers message handler (evidence: `main.py`)
- Bot lifecycle → Class notices: starts task (evidence: `main.py`)
- Bot lifecycle → Payment notice: starts task (evidence: `main.py`)
- Bot lifecycle → Reminder notices: starts task (evidence: `main.py`)
- Class notices → Bot reference data: reads class schedule and channel (evidence: `comandos.py`)
- Class notices → Discord platform: sends notices (evidence: `comandos.py`)
- Payment notice → Bot reference data: reads channel (evidence: `comandos.py`)
- Payment notice → Discord platform: sends notice (evidence: `comandos.py`)
- Reminder notices → Bot reference data: reads channel (evidence: `comandos.py`)
- Reminder notices → Reminder list: reads and removes due reminders (evidence: `comandos.py`)
- Reminder notices → Discord platform: sends reminders (evidence: `comandos.py`)
- Bot lifecycle → Discord platform: connects and announces readiness (evidence: `main.py`)
