How measyasak52-ux/we-bot works
TitanBot is a multi-server Discord bot for community administration and engagement. Discord interactions and events enter the bot, which loads commands and handlers, invokes feature services, and persists guild-scoped state through a PostgreSQL-backed database layer (with memory fallback noted in the README). The map preserves the README’s major feature areas; unsampled feature internals are represented by their existing directories. Edges are limited to relationships visible in excerpts, the source index, or README statements.
Main entry points: commands Server commands · app.js Bot application · events Event handling · database.js Database access
Components 21
Bot runtime
- Bot application
src/app.js - Event handling
src/events - Command loading
src/handlers/loaders/commandLoader.js - Server commands
src/commands
Community systems
- Moderation
src/commands/Moderation - Ticket system
src/commands/Ticket - Verification
src/services/verificationService.js - Logging
src/services/loggingService.js
Engagement features
- Economy
src/commands/Economy - Leveling and XP
src/services/leveling/leveling.js - Giveaways
src/services/giveawayService.js - Birthday system
src/services/birthdayService.js - Music playback
src/services/music/playerHandler.js - Other server features
src/commands
Interaction experience
- Interactive components
src/interactions - Reply and error handling
src/utils/interactionHelper.js
Persistence and config
- Guild configuration
src/services/config/guildConfig.js - Database access
src/utils/database.js - PostgreSQL adapter
src/utils/postgresDatabase.js - Bot configuration
src/config/bot.js
Other components
- Discord
Connections 21
- Discord → Event handling: sends events
README.md - Event handling → Server commands: dispatches commands
src/events/interactionCreate.js - Bot application → Command loading: loads commands
src/app.js - Bot application → Database access: initializes
src/app.js - Bot application → Guild configuration: uses configuration
src/app.js - Bot application → Music playback: sets up playback
src/app.js - Guild configuration → Database access: reads and writes
src/services/config/guildConfig.js - Database access → PostgreSQL adapter: uses adapter
src/utils/database.js - Database access → Bot configuration: reads settings
src/utils/database.js - Event handling → Interactive components: handles interactions
src/events/interactionCreate.js - Event handling → Reply and error handling: uses reply helpers
src/events/interactionCreate.js - Server commands → Moderation: provides commands
README.md - Server commands → Ticket system: provides commands
README.md - Server commands → Economy: provides commands
README.md - Server commands → Leveling and XP: provides commands
README.md - Server commands → Giveaways: provides commands
README.md - Server commands → Birthday system: provides commands
README.md - Server commands → Music playback: provides commands
README.md - Server commands → Verification: provides commands
README.md - Server commands → Logging: provides commands
README.md - Server commands → Other server features: provides features
README.md