How utlandr/mksbot works
Project Type and Purpose
• MksBot is a single‐process, asynchronous Discord bot written in Python.
• It uses discord.py’s rewrite branch (v1.0+), implements a plugin (Cog) architecture, and interacts with external services (YouTube, Reddit) and local audio files.
File Structure
• Top‐level files:
• mksbot_main.py – the entry point (bootstraps bot, loads Cogs, reads config)
• base_functions.py – shared utility routines
• config-template.yaml – configuration schema (token, prefixes, API keys)
• requirements.txt – Python dependencies
• audio/ – local WAV files for text‐to‐speech “Droidspeak” and an output/ directory
• cogs/ – three subdirectories for plugin modules:
• amusement/ – fun commands
• reddit/ – PRAW-based web scraping
• voice/ – audio streaming and TTS, plus voice_config.yml
• testing/ – contains simple timing test script
• screenshots/ – documentation assets
README for Technical Insights
• The bot streams YouTube/local audio (ffmpeg), scrapes Reddit (PRAW), handles commands via cogs, and runs on a Raspberry Pi.
• Dependencies: discord.py (rewrite), ffmpeg, reddit modules.
Detail Level
• Config loader feeding into mksbot_main.
• Two distinct media‐streaming flows.
• Avoid overcrowding: group minor utilities if needed, but keep the core/event flow fully detailed.