How jevenchy/easyvoice works
EasyVoice is a Discord bot for creating and managing temporary voice rooms. A member joins the configured trigger channel; the bot creates a room and presents dashboard controls for owner and room settings. Interactions are routed to command or voice-control handlers, while voice-state events support room lifecycle management. Guild/channel state is persisted in JSON, and the README also documents setup, teardown, multilingual help, logging, and automatic cleanup. Some subsystems are represented from README or source-index references rather than inspected implementation excerpts, so uncertain links are omitted.
Main entry points: voiceService.ts Room lifecycle service · app.ts Client and events · commands Setup and help · database.ts Database interface
Components 21
Bot runtime
- Bot entry
src/index.ts - Client and events
src/core/app.ts - Interaction event
src/events/interactionCreate.ts - Voice-state event
src/events/voiceStateUpdate.ts - Channel update event
src/events/channelUpdate.ts
Voice rooms
- Room lifecycle service
src/services/voiceService.ts - Automatic cleanup
src/services/voiceCleanupService.ts - Voice configuration
src/config/voiceConfig.ts
Commands and controls
- Command router
src/handlers/commandHandler.ts - Interaction router
src/handlers/interactionHandler.ts - Setup and help
src/commands - Voice controls
src/interactions
Persistence and messaging
- Database interface
src/database/database.ts - JSON persistence
src/database/jsonAdapter.ts - Dashboard embeds
src/embeds/voiceEmbed.ts - Command embeds
src/embeds - Translations
src/utils/translate.ts - Language data
src/language/language.ts - Voice event logging
src/services/voiceService.ts
Other components
- Discord member
- Discord platform
Connections 29
- Discord member → Discord platform: uses bot
- Discord platform → Client and events: delivers events
src/core/app.ts - Bot entry → Client and events: starts
src/index.ts - Client and events → Interaction event: registers
src/core/app.ts - Client and events → Voice-state event: registers
src/core/app.ts - Client and events → Channel update event: registers
src/core/app.ts - Interaction event → Interaction router: dispatches
src/events/interactionCreate.ts - Interaction router → Command router: routes commands
src/handlers/interactionHandler.ts - Command router → Setup and help: dispatches commands
src/handlers/commandHandler.ts - Interaction router → Voice controls: dispatches controls
src/handlers/interactionHandler.ts - Voice-state event → Room lifecycle service: manages rooms
src/events/voiceStateUpdate.ts - Channel update event → Room lifecycle service: checks updates
src/events/channelUpdate.ts - Voice controls → Room lifecycle service: uses room operations
src/interactions/buttons/voiceClaim.ts - Setup and help → Room lifecycle service: creates setup channels
src/commands/setup.ts - Room lifecycle service → Database interface: reads and writes
src/services/voiceService.ts - Database interface → JSON persistence: instantiates
src/database/database.ts - Room lifecycle service → Dashboard embeds: builds dashboard
src/services/voiceService.ts - Automatic cleanup → Room lifecycle service: deletes idle rooms
src/services/voiceCleanupService.ts - Automatic cleanup → Database interface: checks stored rooms
src/services/voiceCleanupService.ts - Room lifecycle service → Discord platform: creates and deletes rooms
src/services/voiceService.ts - Room lifecycle service → Voice event logging: logs room actions
src/services/voiceService.ts - Setup and help → Database interface: reads setup state
src/commands/help.ts - Setup and help → Command embeds: renders command replies
src/commands/setup.ts - Command embeds → Translations: translates text
src/embeds/helpEmbed.ts - Dashboard embeds → Translations: translates controls
src/embeds/voiceEmbed.ts - Translations → Language data: looks up strings
src/utils/translate.ts - Room lifecycle service → Voice configuration: uses settings
src/services/voiceService.ts - Voice-state event → Discord member: observes joins
- Discord platform → Discord member: shows temporary room