An automated Python bot with a beautiful GUI that harvests a 10x10 grid of plots in a snake pattern, automatically sells crops when inventory is full, and tracks comprehensive statistics in real-time.
2025-12-25.12-23-27.mp4
To achieve a portable-executable format, the application is packaged with PyInstaller into an EXE. Some antivirus engines (including Windows Defender) might report the packaged executable as a trojan, because PyInstaller has been used by others to package malicious Python code in the past. These reports can be safely ignored. If you absolutely do not trust the executable, you'll have to install Python yourself and run everything from source.
This is the easiest way to get the bot running, no programming skills required!
- Go to the Releases Page on the right side of this page.
- Under the latest release, find the Assets section.
- Download the
MagicGardenBot.exefile. - Place the executable in its own folder on your computer (recommended for organization).
Note: If you don't see a Releases page, you can follow the Advanced Setup Guide to run the bot using Python.
The bot comes with a default inventory_full.png image located in the src/images/ folder. This image helps the bot detect when your in-game inventory is full.
Most users will NOT need to do this step. The provided image should work for common game setups.
However, if the bot isn't detecting your inventory correctly:
- In the game, make your inventory full so the "Inventory Full" pop-up appears.
- Press
Windows Key + Shift + Sto open the Snipping Tool. - Drag a box and capture only the pop-up message.
- Save this new screenshot as
inventory_full.pnginside thesrc/images/folder, overwriting the existing one.
This ensures the bot has the correct image for your specific game resolution and UI.
- Double-click
MagicGardenBot.exeto start the bot. - If Windows shows a security warning, click "More info" -> "Run anyway". This is normal for new applications.
- Position your game character at the top-left plot of your garden.
- Click the big green "START" button in the bot's window.
- You have 3 seconds to switch back to your game window.
The bot will now start harvesting! You can monitor its progress in the GUI. To stop it, click the "STOP" button or move your mouse to the very top-left corner of your screen.
If you want to run the Python script directly or modify the code, follow these steps.
- Fork the Repository: Click the "Fork" button at the top-right of this page. This creates your own copy of the project under your GitHub account.
- Clone Your Fork: Click the green "< > Code" button on your forked repository page, copy the URL, and run the following command in your terminal (like Command Prompt or PowerShell):
git clone <your-copied-url>
- Navigate into the new folder:
cd Magic-Garden-Discord-Bot
If you don't have Python, download the latest version from python.org. Make sure to check the box that says "Add Python to PATH" during installation.
Open your terminal in the project folder and run this command. It will automatically install all the necessary libraries from the requirements.txt file.
pip install -r requirements.txtRefer to Step 2 of the Quick Start Guide for instructions on how to verify or update the inventory_full.png screenshot, which is crucial for the bot's auto-sell feature.
In your terminal, run the following command:
python main.pyThe bot's GUI should appear, and you can start it just like in the Quick Start Guide.
- Snake Pattern Harvesting - Efficiently covers all 100 plots
- Auto-Sell System - Detects full inventory and sells automatically
- Journal Interruption Handling - Automatically handles journal pop-ups during gameplay
- Smart Return - Intelligently returns to starting position
- Hotkey Integration - Fast navigation using keyboard shortcuts
- Continuous Loop - Runs indefinitely until manually stopped
- Modern Dark Theme - Discord-inspired, eye-friendly interface powered by CustomTkinter
- Real-time Statistics - Live metrics updated every 100ms
- Mini Map - Visual representation of current harvesting progress
- Activity Log - Color-coded messages with auto-scroll
- Status Badge - Dynamic colored indicator for running/idle states
- Collapsible Sections - Organized, clean interface with expandable panels
- Built-in Guide - Comprehensive help system with sidebar navigation
- Tooltips - Helpful hints on hover for all controls
- Configurable Settings - Adjust all parameters on-the-fly
- Persistent Config - Settings saved between sessions
All settings can be adjusted directly in the GUI. They are saved automatically in a bot_config.json file in your user home directory.
| Setting | Description | Default |
|---|---|---|
GRID_SIZE |
Size of the garden grid (e.g., 10 for a 10x10 grid) | 10 |
HARVEST_COUNT |
How many times to press the harvest key on each plot | 5 |
MOVE_DELAY |
Delay between each step (in seconds). Increase if movement is choppy. | 0.15 |
HARVEST_DELAY |
Delay between each harvest action (in seconds). | 0.1 |
LOOP_COOLDOWN |
How long to wait after completing a full harvest cycle (in seconds). | 2 |
- Bot Not Detecting "Inventory Full":
- Retake your
inventory_full.pngscreenshot. Make sure it's a clear, tight crop of the pop-up. - Ensure the pop-up in-game looks exactly the same as it did when you took the screenshot.
- Retake your
- Movement is Too Fast/Slow:
- Adjust the
MOVE_DELAYandHARVEST_DELAYsettings in the GUI. - Click "Save Config" to apply the changes.
- Adjust the
- Bot Stops Unexpectedly:
- Check the Activity Log in the GUI for any red error messages.
- Make sure the game window remains the active, focused window.
This bot is for educational purposes only. Use it responsibly and in accordance with the game's terms of service. The developers are not responsible for any consequences resulting from its use.
Contributions, issues, and feature requests are welcome! If you're a developer, feel free to check out the developer-focused sections below.
MAGIC-GARDEN-DISCORD-BOT/
├── .github/
│ └── workflows/
│ └── release.yml
├── src/
│ ├── core/
│ │ ├── __init__.py
│ │ ├── automation.py # Main harvesting loop logic
│ │ ├── config.py # Configuration management
│ │ ├── game_actions.py # Game interaction helpers
│ │ └── state.py # Shared application state
│ ├── gui/
│ │ ├── __init__.py
│ │ ├── collapsible_frame.py # Expandable UI sections
│ │ ├── guide_window.py # Built-in help/guide system
│ │ ├── main_window.py # Main application window
│ │ ├── mini_map.py # Visual grid progress indicator
│ │ ├── status_badge.py # Dynamic status indicator
│ │ └── tooltip.py # Hover tooltips component
│ ├── images/
│ │ ├── garden_button.png
│ │ ├── go_to_journal.png
│ │ ├── harvest_button.png
│ │ ├── inventory_full.png
│ │ ├── log_new_items_in_journal.png
│ │ ├── sell_all_button.png
│ │ └── sell_button.png
│ ├── bot_icon.ico
│ └── version.txt
├── main.py # Application entry point
├── .gitignore
├── LICENSE
├── MagicGardenBot.spec # PyInstaller build spec
├── README.md
└── requirements.txt
| Package | Purpose |
|---|---|
pyautogui |
Mouse/keyboard automation |
opencv-python |
Image recognition for screen detection |
numpy |
Array operations for image processing |
pynput |
Keyboard/mouse input monitoring |
customtkinter |
Modern themed Tkinter GUI |
If you want to bundle the application into a .exe file yourself, you'll need pyinstaller.
- Install PyInstaller:
pip install pyinstaller
- Build the Executable:
Run this command from the root folder of the project:
The final
pyinstaller --onefile --windowed --icon=src/bot_icon.ico --add-data "src/images;images" --name="MagicGardenBot" main.py
.exewill be located in thedistfolder.
Happy Harvesting!