How m24842/coc_bot works
Clash of Clans Bot automates gameplay across configured emulator accounts. The principal workflow starts at the CLI or desktop launcher, initializes an account, then repeatedly checks game state and runs home- and builder-village upgrades and attacks through shared device/screen utilities. Separate control surfaces provide desktop and web status, pause/resume, exclusions, and notifications; the README also documents Telegram notifications, app updates, and emulator lifecycle features. Edges reflect explicit calls and documented capabilities; unsampled subsystems are represented only where their paths are supported.
Main entry points: coc_bot.py Bot orchestrator · utils.py Device and screen utilities · app.py Web control app · launch.py Launcher
Components 17
Bot runtime
- CLI entry
src/main.py - Launcher
src/launch.py - Bot orchestrator
src/coc_bot.py
Game automation
- Upgrade automation
src/upgrader.py - Attack automation
src/attacker.py - Device and screen utilities
src/utils.py
Control surfaces
- Desktop GUI
src/gui.py - Local control server
src/gui_server/gui_server.py - Web control app
app/app.py - Web interface
app/templates - Instance state cache
app/app.py
Operations
- Logging
src/log.py - Game app updates
src/utils.py
Other components
- User
- Android emulator
- Clash of Clans
- Telegram
Connections 23
- User → CLI entry: starts
README.md - CLI entry → Launcher: calls
src/main.py - Launcher → Bot orchestrator: starts process
src/launch.py - Launcher → Desktop GUI: starts GUI
src/launch.py - Desktop GUI → Local control server: starts server
src/gui.py - Local control server → Launcher: dispatches actions
src/launch.py - Bot orchestrator → Upgrade automation: runs upgrades
src/coc_bot.py - Bot orchestrator → Attack automation: runs attacks
src/coc_bot.py - Bot orchestrator → Device and screen utilities: checks game state
src/coc_bot.py - Upgrade automation → Device and screen utilities: uses screen controls
src/upgrader.py - Attack automation → Device and screen utilities: uses screen controls
src/attacker.py - Device and screen utilities → Logging: logs activity
src/utils.py - Device and screen utilities → Android emulator: controls via ADB
- Android emulator → Clash of Clans: runs
README.md - Bot orchestrator → Local control server: updates status
- Local control server → Web interface: renders pages
src/gui_server/gui_server.py - User → Web control app: opens controls
README.md - Web control app → Web interface: renders pages
app/app.py - Web control app → Instance state cache: reads and writes
app/app.py - Bot orchestrator → Web control app: sends status and notifications
- Web control app → Bot orchestrator: provides exclusions and pause state
- Bot orchestrator → Telegram: sends notifications
- Device and screen utilities → Game app updates: supports app updates
src/utils.py