How sennyru/nosookbot works
Project type and purpose
• This is a full-stack “service” bot for Discord written in Python.
• Purpose: Fetch and display voice call log data in channels, maintain real-time timeline embeds, and expose bot info via slash commands.
File structure
• Top-level files:
• main.py / nosookbot.py – entrypoints that initialize the bot and register Cogs
• Dockerfile – containerization
• .github/workflows/deploy.yml – CI/CD pipeline for automatic deployment
• requirements.txt – library dependencies (Pycord, firebase-admin, etc.)
• Cogs/ directory:
• core.py – commands for /노숙봇, /타임라인
• call_log.py – logic for /리얼타임 (real-time timeline) and retrieving/storing call logs
• README.md describes the bot’s features, tech stack (Python, Pycord, Firebase), and usage.
README for additional insights
• Key external dependencies:
• Discord API (via Pycord)
• Firebase (for persisting call logs and real-time channel configuration)
a. Main components
• External Services (left side):
– Discord API
– Firebase Realtime Database / Firestore
• Bot Application (center):
– Docker Container or runtime environment
– Entry point (main.py / nosookbot.py)
– Cogs modules: core, call_log
– Dependency manager (requirements.txt)
• CI/CD Pipeline (top/right):
– GitHub Actions ─ triggers Docker build & deploy
• Deployment Target (bottom/right):
– Hosting environment (could be a VM, Kubernetes cluster, AWS ECS, etc.)
b. Relationships and interactions
• Discord API ↔ Bot Application:
– Bot subscribes to events (slash commands, voice channel updates)
– Bot sends messages and embeds back to Discord
• Bot Application ↔ Firebase:
– Reads/writes call log records
– Stores “real-time timeline channel” configuration
• CI/CD Pipeline → Docker Container:
– On push to main, build Docker image and deploy to target
c. Architectural patterns and design principles
• Modular architecture via Cogs – separation of command handling from core logic
• Single responsibility: each Cog handles a distinct feature set
• Containerization for consistent runtime
• Event-driven interactions with external APIs
d. Key technologies
• Python 3.x, Pycord for Discord interactions
• firebase-admin SDK in call_log.py
• Docker for packaging
• GitHub Actions for CI/CD
IMPORTANT
• Be very detailed: include each Cog as a sub-component.
• Architectural elements: container boundary, config files, CI pipeline.
• Do not overcrowd—group related Cogs but label them individually.