How tristanofjugdral/mc2jtd works
MC2JTD is a Discord bot that relays Cobbleverse Minecraft chat-log events into a configured Discord channel. Administrators use prefixed commands to select a local log or configure SFTP, set the destination and adjust message, notification and role settings; a background reader tails the selected source, filters and formats relevant lines, then posts them to Discord. The sampled code shows separate local and remote readers, shared settings persistence, and command-driven reader restarts. The imported censor helper is absent from the supplied tree, so it is not represented separately.
Main entry points: basic_commands.py Admin commands · settings.py Settings and persistence · msg_receive.py Local log reader · sftp_reader.py SFTP log reader
Components 8
Bot runtime
- Bot startup
main.py
Administration
- Admin commands
cogs/basic_commands.py
Log ingestion
- Local log reader
cogs/msg_receive.py - SFTP log reader
cogs/sftp_reader.py
Configuration
- Settings and persistence
data/settings.py
Other components
- Bot operator
- Discord
- Minecraft logs
Connections 15
- Bot startup → Local log reader: loads cog
main.py - Bot startup → Admin commands: loads cog
main.py - Bot startup → SFTP log reader: loads cog
main.py - Bot operator → Admin commands: issues commands
cogs/basic_commands.py - Admin commands → Settings and persistence: updates settings
cogs/basic_commands.py - Admin commands → Local log reader: restarts reader
cogs/basic_commands.py - Admin commands → SFTP log reader: configures and restarts
cogs/basic_commands.py - Settings and persistence → Local log reader: provides configuration
cogs/msg_receive.py - Settings and persistence → SFTP log reader: provides configuration
cogs/sftp_reader.py - Settings and persistence → Settings and persistence: reads and writes config
data/settings.py - Minecraft logs → Local log reader: provides local log
cogs/msg_receive.py - Minecraft logs → SFTP log reader: provides remote log
cogs/sftp_reader.py - Local log reader → Discord: posts filtered messages
cogs/msg_receive.py - SFTP log reader → Discord: posts filtered messages
cogs/sftp_reader.py - Admin commands → Discord: replies to commands
cogs/basic_commands.py