# enesemre0/voidbot architecture

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

- Interactive diagram: https://gitdiagram.com/enesemre0/voidbot
- Repository: https://github.com/enesemre0/voidbot

## Overview

VoidBot is a Turkish-language Discord bot. A user sends a prefixed message; the registered message handler resolves a command or alias, then runs a command that responds in Discord and may update server settings or game state. Its command set spans moderation, server utilities, economy, entertainment, and information. The tree and sampled files support this runtime and several feature branches; many individual commands were not inspected, so their internal behavior and integrations are not detailed here.

Main entry points: [`events/message.js`](https://github.com/enesemre0/voidbot/blob/master/events/message.js) (Command dispatch), [`index.js`](https://github.com/enesemre0/voidbot/blob/master/index.js) (Bot startup), [`util/eventLoader.js`](https://github.com/enesemre0/voidbot/blob/master/util/eventLoader.js) (Event loader), [`komutlar/duello.js`](https://github.com/enesemre0/voidbot/blob/master/komutlar/duello.js) (Duel game)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Bot Runtime"]
  node_entry["Bot startup<br/>[index.js]"]
  node_loader["Event loader<br/>[eventLoader.js]"]
  node_message["Command dispatch<br/>[message.js]"]
  node_update["Message updates<br/>[messageUpdate.js]"]
  node_ready["Ready handler<br/>[ready.js]"]
end

subgraph group_moderation["Moderation"]
  node_moderation_cmds["Moderation commands"]
  node_jail["Jail workflow<br/>[jail.js]"]
end

subgraph group_server["Server Tools"]
  node_server_cmds["Server utilities"]
  node_autoanswer["Auto-answer setup<br/>[aaa.js]"]
end

subgraph group_games["Games &amp; Economy"]
  node_economy["Economy commands"]
  node_entertainment["Entertainment commands"]
  node_duel["Duel game<br/>[duello.js]"]
  node_util["Game utilities<br/>[Util.js]"]
end

subgraph group_info["Information"]
  node_currency["Currency lookup<br/>[döviz.js]"]
  node_info_cmds["Info commands"]
end

node_user(("Discord user"))
node_discord{{"Discord"}}
node_db[("Quick.db store")]
node_tcmb{{"TCMB rates"}}

node_user -->|"sends messages"| node_discord
node_discord -->|"delivers events"| node_message
node_entry -->|"registers events"| node_loader
node_loader -->|"routes messages"| node_message
node_loader -->|"routes updates"| node_update
node_loader -->|"routes ready"| node_ready
node_entry -->|"loads commands"| node_moderation_cmds
node_entry -->|"loads commands"| node_server_cmds
node_entry -->|"loads commands"| node_economy
node_entry -->|"loads commands"| node_entertainment
node_entry -->|"loads commands"| node_info_cmds
node_message -->|"dispatches to"| node_moderation_cmds
node_message -->|"dispatches to"| node_server_cmds
node_message -->|"dispatches to"| node_economy
node_message -->|"dispatches to"| node_entertainment
node_message -->|"dispatches to"| node_info_cmds
node_moderation_cmds -->|"includes command"| node_jail
node_server_cmds -->|"includes command"| node_autoanswer
node_info_cmds -->|"includes command"| node_currency
node_entertainment -->|"includes game"| node_duel
node_jail -->|"stores jail state"| node_db
node_autoanswer -->|"stores replies"| node_db
node_duel -->|"uses verification"| node_util
node_duel -->|"adds winner points"| node_db
node_currency -->|"fetches rates"| node_tcmb
node_message -->|"invokes command"| node_discord
node_ready -->|"sets presence"| node_discord

click node_entry "https://github.com/enesemre0/voidbot/blob/master/index.js"
click node_loader "https://github.com/enesemre0/voidbot/blob/master/util/eventLoader.js"
click node_message "https://github.com/enesemre0/voidbot/blob/master/events/message.js"
click node_update "https://github.com/enesemre0/voidbot/blob/master/events/messageUpdate.js"
click node_ready "https://github.com/enesemre0/voidbot/blob/master/events/ready.js"
click node_moderation_cmds "https://github.com/enesemre0/voidbot/tree/master/komutlar"
click node_jail "https://github.com/enesemre0/voidbot/blob/master/komutlar/jail.js"
click node_server_cmds "https://github.com/enesemre0/voidbot/tree/master/komutlar"
click node_autoanswer "https://github.com/enesemre0/voidbot/blob/master/komutlar/aaa.js"
click node_economy "https://github.com/enesemre0/voidbot/tree/master/komutlar"
click node_entertainment "https://github.com/enesemre0/voidbot/tree/master/komutlar"
click node_duel "https://github.com/enesemre0/voidbot/blob/master/komutlar/duello.js"
click node_util "https://github.com/enesemre0/voidbot/blob/master/util/Util.js"
click node_currency "https://github.com/enesemre0/voidbot/blob/master/komutlar/d%C3%B6viz.js"
click node_info_cmds "https://github.com/enesemre0/voidbot/tree/master/komutlar"

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_loader,node_message,node_update,node_ready,node_user toneBlue
class node_moderation_cmds,node_jail,node_db toneAmber
class node_server_cmds,node_autoanswer toneMint
class node_economy,node_entertainment,node_duel,node_util toneRose
class node_currency,node_info_cmds,node_discord,node_tcmb toneIndigo
```

## Components

### Bot Runtime

- [Bot startup](https://github.com/enesemre0/voidbot/blob/master/index.js): `index.js`
- [Event loader](https://github.com/enesemre0/voidbot/blob/master/util/eventLoader.js): `util/eventLoader.js`
- [Command dispatch](https://github.com/enesemre0/voidbot/blob/master/events/message.js): `events/message.js`
- [Message updates](https://github.com/enesemre0/voidbot/blob/master/events/messageUpdate.js): `events/messageUpdate.js`
- [Ready handler](https://github.com/enesemre0/voidbot/blob/master/events/ready.js): `events/ready.js`

### Moderation

- [Moderation commands](https://github.com/enesemre0/voidbot/tree/master/komutlar): `komutlar`
- [Jail workflow](https://github.com/enesemre0/voidbot/blob/master/komutlar/jail.js): `komutlar/jail.js`

### Server Tools

- [Server utilities](https://github.com/enesemre0/voidbot/tree/master/komutlar): `komutlar`
- [Auto-answer setup](https://github.com/enesemre0/voidbot/blob/master/komutlar/aaa.js): `komutlar/aaa.js`

### Games & Economy

- [Economy commands](https://github.com/enesemre0/voidbot/tree/master/komutlar): `komutlar`
- [Entertainment commands](https://github.com/enesemre0/voidbot/tree/master/komutlar): `komutlar`
- [Duel game](https://github.com/enesemre0/voidbot/blob/master/komutlar/duello.js): `komutlar/duello.js`
- [Game utilities](https://github.com/enesemre0/voidbot/blob/master/util/Util.js): `util/Util.js`

### Information

- [Currency lookup](https://github.com/enesemre0/voidbot/blob/master/komutlar/d%C3%B6viz.js): `komutlar/döviz.js`
- [Info commands](https://github.com/enesemre0/voidbot/tree/master/komutlar): `komutlar`

### Other components

- **Discord user**
- **Discord**
- **Quick.db store**
- **TCMB rates**

## Connections

- Discord user → Discord: sends messages
- Discord → Command dispatch: delivers events
- Bot startup → Event loader: registers events (evidence: `index.js`)
- Event loader → Command dispatch: routes messages (evidence: `util/eventLoader.js`)
- Event loader → Message updates: routes updates (evidence: `util/eventLoader.js`)
- Event loader → Ready handler: routes ready (evidence: `util/eventLoader.js`)
- Bot startup → Moderation commands: loads commands (evidence: `index.js`)
- Bot startup → Server utilities: loads commands (evidence: `index.js`)
- Bot startup → Economy commands: loads commands (evidence: `index.js`)
- Bot startup → Entertainment commands: loads commands (evidence: `index.js`)
- Bot startup → Info commands: loads commands (evidence: `index.js`)
- Command dispatch → Moderation commands: dispatches to (evidence: `events/message.js`)
- Command dispatch → Server utilities: dispatches to (evidence: `events/message.js`)
- Command dispatch → Economy commands: dispatches to (evidence: `events/message.js`)
- Command dispatch → Entertainment commands: dispatches to (evidence: `events/message.js`)
- Command dispatch → Info commands: dispatches to (evidence: `events/message.js`)
- Moderation commands → Jail workflow: includes command
- Server utilities → Auto-answer setup: includes command
- Info commands → Currency lookup: includes command
- Entertainment commands → Duel game: includes game
- Jail workflow → Quick.db store: stores jail state (evidence: `komutlar/jail.js`)
- Auto-answer setup → Quick.db store: stores replies (evidence: `komutlar/aaa.js`)
- Duel game → Game utilities: uses verification (evidence: `komutlar/duello.js`)
- Duel game → Quick.db store: adds winner points (evidence: `komutlar/duello.js`)
- Currency lookup → TCMB rates: fetches rates (evidence: `komutlar/döviz.js`)
- Command dispatch → Discord: invokes command (evidence: `events/message.js`)
- Ready handler → Discord: sets presence (evidence: `events/ready.js`)
