How okbuddyhololive/polkabot works
Polkabot is a Discord bot that collects server messages, generates Markov-chain text for impersonation, and provides related commands for opting out, statistics, and media links. The main workflow is a Discord message entering the collection listener, being stored through the message manager, then later retrieved and generated into a webhook message by an impersonation command. Other cogs handle consent, statistics, and media discovery. The graph reflects the shown setup and excerpts; some cogs and configuration details were not sampled, so their internal relationships are omitted.
Main entry points: chain.py Message manager · bot.py Bot setup · impersonation.py Impersonation · other.py Media commands
Components 16
Bot runtime
- Bot setup
bot.py - Event handling
cogs/events.py - Help command
modules/help.py - Cooldown checks
modules/cooldown.py
Message data
- Message manager
modules/chain.py - Message records
modules/chain.py - Opt-out records
cogs/opting.py - Banned links
cogs/other.py
User commands
- Impersonation
cogs/impersonation.py - Opt-in controls
cogs/opting.py - Message statistics
cogs/statistics.py - Media commands
cogs/other.py
Webhook delivery
- Webhook manager
modules/webhooks.py - Webhook records
modules/webhooks.py
Other components
- Discord user
- Discord platform
Connections 22
- Discord user → Discord platform: sends commands
README.md - Discord platform → Bot setup: delivers events
bot.py - Bot setup → Event handling: loads cog
bot.py - Bot setup → Help command: configures help
bot.py - Bot setup → Cooldown checks: applies cooldowns
bot.py - Bot setup → Discord platform: runs bot
bot.py - Discord platform → Impersonation: delivers messages
cogs/impersonation.py - Impersonation → Message manager: adds and retrieves
cogs/impersonation.py - Impersonation → Webhook manager: gets or creates
cogs/impersonation.py - Impersonation → Opt-out records: checks users
cogs/impersonation.py - Message manager → Message records: reads and writes
modules/chain.py - Message manager → Discord platform: generates text
modules/chain.py - Webhook manager → Webhook records: reads and writes
modules/webhooks.py - Webhook manager → Discord platform: creates webhook
modules/webhooks.py - Opt-in controls → Message manager: deletes user data
cogs/opting.py - Opt-in controls → Opt-out records: updates consent
cogs/opting.py - Message statistics → Message manager: queries messages
cogs/statistics.py - Media commands → Message manager: queries links
cogs/other.py - Media commands → Banned links: reads and records
cogs/other.py - Impersonation → Discord platform: sends impersonation
cogs/impersonation.py - Message statistics → Discord platform: replies with results
cogs/statistics.py - Media commands → Discord platform: replies with media
cogs/other.py