How lostinsyntaxx/bot-discord-demo works
This is a Discord.js bot with a companion authenticated HTTP API/dashboard. Its main user workflow is Discord interactions dispatched to commands or components, which perform bot features and return Discord responses. The API offers a second management path for guild, moderation, music, and utility features. The README documents broader command and component capabilities than the sampled source; links among unsampled feature modules are therefore omitted.
Main entry points: routes Management routes · commands Slash commands · index.ts Bot startup · server.ts HTTP application
Components 21
Bot runtime
- Bot startup
src/index.ts - Discord events
src/events - Interaction dispatch
src/events/interaction/interactionCreate.ts - Command loader
src/handlers/commandHandler.ts - Component loader
src/handlers/componentHandler.ts
Discord features
- Slash commands
src/commands - Buttons and forms
src/components - Moderation features
src/commands/moderation - Music controls
src/commands/music - Guild utilities
src/commands/utility
HTTP API
- API lifecycle
src/services/api.service.ts - HTTP application
src/api/server.ts - Management routes
src/webServer/routes - API authentication
src/webServer/middleware/auth.ts
Business services
- Ticket lifecycle
src/services/ticket.service.ts - Channel editing
src/services/channelEdit.service.ts
Configuration and state
- Guild configuration
src/utils/guildConfig.ts - SQLite database
src/services/database.service.ts
Other components
- Discord user
- Dashboard admin
- Discord platform
Connections 27
- Discord user → Discord platform: uses
- Discord platform → Interaction dispatch: delivers interactions
- Interaction dispatch → Slash commands: dispatches commands
- Interaction dispatch → Buttons and forms: dispatches components
- Bot startup → Command loader: loads commands
- Bot startup → Component loader: loads components
- Bot startup → Discord events: loads events
- Command loader → Slash commands: loads
- Component loader → Buttons and forms: loads
- Slash commands → Moderation features: includes
- Slash commands → Music controls: includes
- Slash commands → Guild utilities: includes
- Slash commands → Discord platform: replies and acts
- Buttons and forms → Discord platform: updates interactions
- Dashboard admin → HTTP application: sends requests
- Bot startup → API lifecycle: initializes
- API lifecycle → HTTP application: creates app
- HTTP application → API authentication: applies middleware
- HTTP application → Management routes: mounts routers
- Management routes → Discord platform: manages guilds
- Management routes → Moderation features: handles moderation
- Management routes → Music controls: handles music
- Management routes → Ticket lifecycle: manages tickets
- Management routes → Channel editing: edits channels
- Management routes → Guild configuration: reads and writes
- Ticket lifecycle → SQLite database: reads and writes
- Bot startup → SQLite database: initializes