# u9wq/bot-gestion architecture

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

- Interactive diagram: https://gitdiagram.com/u9wq/bot-gestion
- Repository: https://github.com/u9wq/bot-gestion

## Overview

Bot de gestion Discord : les administrateurs configurent des commandes et des politiques depuis Discord, tandis que les membres interagissent avec les fonctionnalités du serveur. Au démarrage, le client charge commandes et écouteurs avant de se connecter ; ces entrées pilotent ensuite modération, protection, tickets, journaux et animation. SQLite conserve notamment configuration, sanctions et tâches différées. Les capacités produit sont principalement documentées dans le README ; les liens non étayés par les extraits ou l’index sont omis.

Main entry points: [`index.js`](https://github.com/u9wq/bot-gestion/blob/main/index.js) (Point d’entrée), [`core/db.js`](https://github.com/u9wq/bot-gestion/blob/main/core/db.js) (SQLite), [`Commands/Modérations`](https://github.com/u9wq/bot-gestion/tree/main/Commands/Mod%C3%A9rations) (Modération), [`Events/sendlog.js`](https://github.com/u9wq/bot-gestion/blob/main/Events/sendlog.js) (Envoi des journaux)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Démarrage et routage"]
  node_entry["Point d’entrée<br/>[index.js]"]
  node_prefix["Commandes préfixées"]
  node_slash["Commandes slash"]
  node_events["Écouteurs Discord"]
  node_interaction["Routage interactions"]
end

subgraph group_governance["Gestion du serveur"]
  node_moderation["Modération"]
  node_antiraid["Protection anti-raid<br/>[antiraid.js]"]
  node_permissions["Permissions<br/>[perms.js]"]
end

subgraph group_community["Fonctions communautaires"]
  node_tickets["Tickets et conditions"]
  node_animation["Animation communautaire"]
  node_snake["Jeu Snake<br/>[SnakeGame.js]"]
  node_giveaways["Gestion giveaways<br/>[giveaways.js]"]
end

subgraph group_operations["État et journalisation"]
  node_logging["Configuration des journaux<br/>[logs.js]"]
  node_logdispatch["Envoi des journaux<br/>[sendlog.js]"]
  node_reminders["Rappels persistants<br/>[rappels.js]"]
  node_presence["Présence du bot<br/>[presence.js]"]
  node_stats["Statistiques serveur<br/>[updateStats.js]"]
  node_database[("SQLite<br/>[db.js]")]
end

node_admins(("Administrateurs"))
node_members(("Membres Discord"))
node_discord{{"Discord API"}}

node_admins -->|"configure via"| node_discord
node_members -->|"interact via"| node_discord
node_entry -->|"charge"| node_prefix
node_entry -->|"charge"| node_slash
node_entry -->|"charge"| node_events
node_entry -->|"initialise"| node_giveaways
node_entry -->|"connecte"| node_discord
node_discord -->|"émet événements"| node_events
node_discord -->|"reçoit commandes"| node_prefix
node_discord -->|"reçoit commandes"| node_slash
node_admins -->|"administre"| node_moderation
node_admins -->|"configure"| node_antiraid
node_admins -->|"configure"| node_tickets
node_admins -->|"configure"| node_logging
node_admins -->|"attribue niveaux"| node_permissions
node_members -->|"ouvre tickets"| node_tickets
node_members -->|"utilise"| node_animation
node_members -->|"joue"| node_snake
node_moderation -->|"stocke sanctions"| node_database
node_moderation -->|"journalise"| node_logdispatch
node_antiraid -->|"journalise"| node_logdispatch
node_logging -->|"lit et écrit"| node_database
node_logdispatch -->|"lit destinations"| node_database
node_interaction -->|"affiche aide"| node_prefix
node_interaction -->|"met à jour menu"| node_discord
node_reminders -->|"lit et écrit"| node_database
node_presence -->|"lit et écrit"| node_database
node_stats -.->|"met à jour"| node_discord
node_giveaways -->|"édite tirage"| node_discord

click node_entry "https://github.com/u9wq/bot-gestion/blob/main/index.js"
click node_prefix "https://github.com/u9wq/bot-gestion/tree/main/Commands"
click node_slash "https://github.com/u9wq/bot-gestion/tree/main/SlashCommands"
click node_events "https://github.com/u9wq/bot-gestion/tree/main/Events"
click node_interaction "https://github.com/u9wq/bot-gestion/blob/main/Events/interactionCreate.js"
click node_moderation "https://github.com/u9wq/bot-gestion/tree/main/Commands/Mod%C3%A9rations"
click node_antiraid "https://github.com/u9wq/bot-gestion/blob/main/core/antiraid.js"
click node_permissions "https://github.com/u9wq/bot-gestion/blob/main/core/perms.js"
click node_tickets "https://github.com/u9wq/bot-gestion/tree/main/Commands/Contact"
click node_animation "https://github.com/u9wq/bot-gestion/tree/main/Commands/Utilitaires"
click node_snake "https://github.com/u9wq/bot-gestion/blob/main/Games/SnakeGame.js"
click node_giveaways "https://github.com/u9wq/bot-gestion/blob/main/Handler/giveaways.js"
click node_logging "https://github.com/u9wq/bot-gestion/blob/main/Utils/logs.js"
click node_logdispatch "https://github.com/u9wq/bot-gestion/blob/main/Events/sendlog.js"
click node_reminders "https://github.com/u9wq/bot-gestion/blob/main/Utils/rappels.js"
click node_presence "https://github.com/u9wq/bot-gestion/blob/main/Utils/presence.js"
click node_stats "https://github.com/u9wq/bot-gestion/blob/main/Events/updateStats.js"
click node_database "https://github.com/u9wq/bot-gestion/blob/main/core/db.js"

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_prefix,node_slash,node_events,node_interaction toneBlue
class node_moderation,node_antiraid,node_permissions toneAmber
class node_tickets,node_animation,node_snake,node_giveaways,node_discord toneMint
class node_logging,node_logdispatch,node_reminders,node_presence,node_stats,node_database toneRose
class node_admins,node_members toneIndigo
```

## Components

### Démarrage et routage

- [Point d’entrée](https://github.com/u9wq/bot-gestion/blob/main/index.js): `index.js`
- [Commandes préfixées](https://github.com/u9wq/bot-gestion/tree/main/Commands): `Commands`
- [Commandes slash](https://github.com/u9wq/bot-gestion/tree/main/SlashCommands): `SlashCommands`
- [Écouteurs Discord](https://github.com/u9wq/bot-gestion/tree/main/Events): `Events`
- [Routage interactions](https://github.com/u9wq/bot-gestion/blob/main/Events/interactionCreate.js): `Events/interactionCreate.js`

### Gestion du serveur

- [Modération](https://github.com/u9wq/bot-gestion/tree/main/Commands/Mod%C3%A9rations): `Commands/Modérations`
- [Protection anti-raid](https://github.com/u9wq/bot-gestion/blob/main/core/antiraid.js): `core/antiraid.js`
- [Permissions](https://github.com/u9wq/bot-gestion/blob/main/core/perms.js): `core/perms.js`

### Fonctions communautaires

- [Tickets et conditions](https://github.com/u9wq/bot-gestion/tree/main/Commands/Contact): `Commands/Contact`
- [Animation communautaire](https://github.com/u9wq/bot-gestion/tree/main/Commands/Utilitaires): `Commands/Utilitaires`
- [Jeu Snake](https://github.com/u9wq/bot-gestion/blob/main/Games/SnakeGame.js): `Games/SnakeGame.js`
- [Gestion giveaways](https://github.com/u9wq/bot-gestion/blob/main/Handler/giveaways.js): `Handler/giveaways.js`

### État et journalisation

- [Configuration des journaux](https://github.com/u9wq/bot-gestion/blob/main/Utils/logs.js): `Utils/logs.js`
- [Envoi des journaux](https://github.com/u9wq/bot-gestion/blob/main/Events/sendlog.js): `Events/sendlog.js`
- [Rappels persistants](https://github.com/u9wq/bot-gestion/blob/main/Utils/rappels.js): `Utils/rappels.js`
- [Présence du bot](https://github.com/u9wq/bot-gestion/blob/main/Utils/presence.js): `Utils/presence.js`
- [Statistiques serveur](https://github.com/u9wq/bot-gestion/blob/main/Events/updateStats.js): `Events/updateStats.js`
- [SQLite](https://github.com/u9wq/bot-gestion/blob/main/core/db.js): `core/db.js`

### Other components

- **Administrateurs**
- **Membres Discord**
- **Discord API**

## Connections

- Administrateurs → Discord API: configure via (evidence: `README.md`)
- Membres Discord → Discord API: interact via (evidence: `README.md`)
- Point d’entrée → Commandes préfixées: charge (evidence: `index.js`)
- Point d’entrée → Commandes slash: charge (evidence: `index.js`)
- Point d’entrée → Écouteurs Discord: charge (evidence: `index.js`)
- Point d’entrée → Gestion giveaways: initialise (evidence: `index.js`)
- Point d’entrée → Discord API: connecte (evidence: `index.js`)
- Discord API → Écouteurs Discord: émet événements (evidence: `README.md`)
- Discord API → Commandes préfixées: reçoit commandes (evidence: `README.md`)
- Discord API → Commandes slash: reçoit commandes (evidence: `README.md`)
- Administrateurs → Modération: administre (evidence: `README.md`)
- Administrateurs → Protection anti-raid: configure (evidence: `README.md`)
- Administrateurs → Tickets et conditions: configure (evidence: `README.md`)
- Administrateurs → Configuration des journaux: configure (evidence: `README.md`)
- Administrateurs → Permissions: attribue niveaux (evidence: `README.md`)
- Membres Discord → Tickets et conditions: ouvre tickets (evidence: `README.md`)
- Membres Discord → Animation communautaire: utilise (evidence: `README.md`)
- Membres Discord → Jeu Snake: joue (evidence: `README.md`)
- Modération → SQLite: stocke sanctions
- Modération → Envoi des journaux: journalise
- Protection anti-raid → Envoi des journaux: journalise (evidence: `core/antiraid.js`)
- Configuration des journaux → SQLite: lit et écrit (evidence: `Utils/logs.js`)
- Envoi des journaux → SQLite: lit destinations (evidence: `Events/sendlog.js`)
- Routage interactions → Commandes préfixées: affiche aide (evidence: `Commands/Informations/help.js`)
- Routage interactions → Discord API: met à jour menu
- Rappels persistants → SQLite: lit et écrit (evidence: `Utils/rappels.js`)
- Présence du bot → SQLite: lit et écrit (evidence: `Utils/presence.js`)
- Statistiques serveur → Discord API: met à jour
- Gestion giveaways → Discord API: édite tirage (evidence: `Handler/giveaways.js`)
