
Arlo discord bot refactored to modular javascript
Arul Nova refactors Arlo, a Discord bot for the Nova Archives writer community, into a modular JavaScript codebase with threaded report logs and a functional availability toggle
Arul Nova released version 2.0 of Arlo, a Discord bot for the Nova Archives writer community, after restructuring the codebase from a monolithic index.js into three dedicated modules: messageaction.js, slashcom.js, and buttonhandlers.js [DevTo]. The bot now starts in index.js, loads the modules, and handles moderation commands such as bans, reports, and a “shelved editor” availability toggle [Discord Docs].
The refactored bot features a modular architecture, separating event handling, slash commands, and button logic. This reduced the main file from ~400 lines to under 100, cutting navigation time for bug fixes by an estimated 70% according to the author’s own timing tests [DevTo].
Arlo also includes a threaded report workflow, where each user report spawns a Discord thread, preserving discussion, resolution, and closure timestamps. The thread-based audit trail replaces the earlier embed-only approach that left moderators without a paper trail.
The author discovered that most bot failures stemmed from unawaited promises, prompting a rewrite that explicitly awaited Discord API calls and added error logging [Discord Docs]. The “Shelved Editor” button now removes the active moderator role when a staff member marks themselves unavailable, preventing accidental pings and ensuring the role reflects real availability.
By prioritizing modularity, audit trails, and precise role management, Arlo scales with the community rather than the developer’s patience. This approach yields a bot that is more maintainable, trustworthy, and efficient in its operations.
Subscribe to the broadcast.
Daily digest of the day's most important tech news. No fluff. Engineering signal only.
// delivered via substack · double-opt-in confirmation


