How dankerow/blop works
Project type and purpose
• This is a Discord bot (“Blop”) built with Node.js and discord.js.
• It provides slash‐commands, image transformations (via an external RawGO API), internationalization (i18next), and persists data (Prisma + PostgreSQL).
File structure
• src/main.ts: entry point that initializes the bot client.
• src/structures: custom Client, Command, and Event classes implement the Discord.js command/event framework.
• src/commands: directory of grouped slash‑command modules (administration, general, images, miscellaneous).
• src/events: handlers for Discord events (ready, interactionCreate).
• src/services: shared services (I18n, central index).
• src/utils: utilities (configLoader, fetch error handler, uptime, image generation helper).
• prisma/schema.prisma: database schema.
• locales/*.json: translation files.
• config files: .env, config.example.ts, i18next configuration in services.
README for additional insights
• Uses Discord’s slash commands.
• Stores guild/user preferences (language, modules enabled) in PostgreSQL via Prisma.
• Offloads image manipulation to a self‑hosted RawGO API.
• Internationalization of command names, descriptions, and responses.
Essential details to capture
• Initialization flow (config → services → register commands → connect).
• Command processing pipeline (Event → Dispatcher → Business Logic → Response).
• Data flow to/from the database and RawGO API.
• Localization engine intercepting output.