This Python script automates sending prompts to MidJourney's Discord bot and downloading the upscaled images using Selenium and cURL.
- Automatically logs into Discord.
- Sends prompts from a
prompts.txt
file. - Automatically clicks the upscale buttons (U1, U2, U3, U4) and downloads the upscaled images.
- Python 3.x installed (Download Python)
- Google Chrome installed (Download Chrome)
- Chrome WebDriver (Download Here)
- MidJourney bot added to your Discord server
Ensure you have Python installed, then install the required dependencies:
pip install -r requirements.txt
Download and install the Chrome WebDriver compatible with your Chrome version:
- ChromeDriver Download
- Place the WebDriver in the project directory or set it in your system PATH.
-
Set Chrome Profile Path:
- Open Chrome and navigate to
chrome://version/
- Copy the "Profile Path" and replace it in the script:
options.add_argument(r'--user-data-dir=C:\Users\Username\AppData\Local\Google\Chrome\User Data\Default')
- Open Chrome and navigate to
-
Modify Discord Channel URL:
- Replace the Discord URL with your channel's link:
driver.get("https://discord.com/channels/@me")
- Clone the repository:
git clone https://github.com/kadangkesel/get_midjourney
- Navigate into the project directory:
cd get_midjourney
- Install dependencies:
pip install -r requirements.txt
- Create a
prompts.txt
file and add your prompts (one per line). - Run the script:
python bot.py
- The script will send prompts, wait for responses, upscale images, and save them to the
downloads
folder.
- Ensure MidJourney Bot is added to your Discord channel.
- The script depends on the Discord UI structure; if it changes, XPaths may need updating.
MIT License
Copyright (c) 2025 kadang_kesel
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.