How s0ca/lambda-bot works
Project type and purpose
• Lambda-Bot is a self-hostable, modular Discord bot written in Python.
• It employs a “cog” (plugin) system: each file in the cogs/ folder encapsulates one feature (music, notes, quiz, etc.).
• It persists state to a local SQLite database and various JSON files, and it even ships with a small static web tool to generate quiz content.
File structure
Top-level files and folders:
• .env.sample & settings.py: configuration placeholders and environment variables (BOT_TOKEN, ADMIN_ROLE_NAME, etc.)
• LambdaBot.py: main entry point—initializes bot, loads cogs, connects to Discord
• cogs/: individual feature modules (administration.py, music.py, quiz.py, etc.)
• init_db.py: script to create the SQLite schema for the notes plugin
• custom_commands.json, magic.json: file-based storage for custom commands and “magic” responses
• data/quiz/: directory of quiz data JSON files
• playlists/: user-managed playlist files for the music plugin
• quiz_editor.py & tool/quiz_generator/: a small static web UI (HTML/CSS/JS) to create quiz JSON
• requirements.txt: Python dependencies (discord.py, sqlite3, etc.)
README for additional insights
• Confirms Python 3.6+, sqlite3, and plugin-based extensibility.
• Instructions on cloning, dependency installation, DB initialization, environment config, and running.
• Mentions future plans: Docker image, improved rights management, more cogs.
Final advice
• Every folder/file group as a logical component.
• Be granular but not overwhelming: group similar cogs if necessary (e.g., all utility cogs together).
• Dynamic behavior (e.g., plugin loading, DB schema init) with notes or legends.
• Keep it up to date whenever new cogs or tools are added.