How steffleupagus/dm-secretary works
DM-Secretary is a Discord server bot for roleplay communities, combining game administration with roleplay, guild, quest, and activity features. Discord interactions enter through the bot’s registered event and command handlers; one key workflow parses Avrae quest messages, updates quest records, and reacts with summaries. Other branches support guild roles, table management, scene and travel operations, and channel activity tracking. The excerpts establish several dispatch and persistence links, but not the full command wiring or most feature internals, so uncertain relationships are omitted.
Main entry points: commands Command handlers · bot.js Bot loader · events Event handlers · cmd_Table.js Table management
Components 17
Bot runtime
- Bot loader
bot.js - Event handlers
handlers/events - Command handlers
handlers/commands - Message handlers
handlers/message - Health dashboard
dashboard/index.js
Roleplay operations
- Scene workflow
utilities/funcsScene.js - Travel commands
handlers/commands/cmd_Travel.js - Table management
handlers/commands/cmd_Table.js - Table operations
utilities/funcsTable.js
Community features
- Guild roles
handlers/commands/cmd_Guild.js
Activity and records
- Quest parser
handlers/message/questMsg.js - Activity updater
handlers/timers/activityUpdate.js
Persistent state
- Quest records
database/questSchema.js - MongoDB models
database
Other components
- Discord users
- Discord API
- MongoDB
Connections 23
- Discord users → Discord API: sends interactions
- Discord API → Event handlers: dispatches events
- Bot loader → Event handlers: registers
bot.js - Bot loader → Command handlers: loads commands
bot.js - Bot loader → Message handlers: loads handlers
bot.js - Bot loader → Health dashboard: can enable
bot.js - Event handlers → Command handlers: routes interactions
handlers/events/interactionCreate.js - Event handlers → Message handlers: dispatches messages
- Command handlers → Guild roles: handles guild commands
- Command handlers → Table management: handles table commands
- Command handlers → Scene workflow: invokes scene logic
- Command handlers → Travel commands: handles travel
- Message handlers → Quest parser: dispatches quest messages
- Quest parser → Quest records: updates records
handlers/message/questMsg.js - Quest parser → Discord API: adds reactions
handlers/message/questMsg.js - Table management → Table operations: awards table
handlers/commands/cmd_Table.js - Table management → MongoDB models: stores table data
- Activity updater → MongoDB models: reads activity metadata
handlers/timers/activityUpdate.js - Activity updater → Discord API: updates channel embeds
handlers/timers/activityUpdate.js - Health dashboard → MongoDB: checks connection
dashboard/index.js - Bot loader → MongoDB: connects
bot.js - Quest records → MongoDB: persists records
database/questSchema.js - MongoDB models → MongoDB: defines models