How driplase/ft works
Main Components
a. Bot Core Engine
• Central “Discord Bot Engine” which is driven by files like main.js and gl.js. This component handles startup, event listeners, and overall orchestration.
b. Command System
• You might also note that many of these commands trigger specific bot functionalities (like sending DM notifications, badges, XP management, etc.).
c. Data and Configuration Stores
• A “Data Store” component that points to directories like “data”, “stats”, and files such as texts.json and config.json. This covers all persistent data like achievement records, language settings, ranking, subscription info, and audio files for TTS.
• Also incorporate “locales” and “ftlocales” directories to emphasize multi-language support.
d. Web Interface Components
• “Web Features” component. This includes the htdocs directory (with subdirectories for rate, timeline, trend, etc.) and data/web which stores shared post templates and default HTML pages. This part depicts the dashboards and website segments used via different localhost ports detailed in the README.
e. External Integrations
• Integrations to external systems and APIs:
• The Discord API for bot operation and event management.
• Google AI Studio for AI-based chat features.
• VOICEVOX and UTAU voicebanks for text-to-speech functionality in voice channels.
• Possibly integration with Second Treron (as a dependency point mentioned in the readme).
• Other external services like DISBOARD and dissoku for bump reminders.
Relationships and Interactions
• That the Command System accesses the “Data Store” for persistent user stats, badges, achievements, etc.
Architectural Patterns or Design Principles
• The project’s modular command structure suggests a plug-in style or command–handler pattern, where each command script (in the commands/utility folder) acts as a separate module.
• Additionally, note the integration with external platforms (web and other bot frameworks), which resembles a microservices-like interaction (even if they run on the same Node.js process) and asynchronous processing.
Relevant Technologies and Frameworks
• That the application is built in Node.js. This should be annotated along with the use of JSON for configuration, YAML for stats, and various templating (HTML, CSS, and JavaScript in the htdocs directory).
• Mention that package management is handled via npm (as seen by package.json and package-lock.json).
• Potential use of pm2 for process management, as suggested in the README.
Details to Capture
• Every directory or major file grouping is accounted for.
• Detail the responsibilities of each component. For example:
• “commands”: where each file is an independent command that the bot can execute.
• “data”: which houses not just static files but user data and runtime-generated data.
• “htdocs”: air interface interfaces that support website features like timeline, trend, and post sharing.
• Clearly denote configuration files (.env, config.json) as supporting the overall orchestration.