Skip to content

a python discord bot which may be used to download images generated by midjourney using a date range. it splits image grids and saves images into a folder structure based on discord channel id.

Notifications You must be signed in to change notification settings

staffordgables/midjourney-history

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

midjourney-history

Brief:

A python Discord bot that may be used to download images generated by Midjourney using a date range. It splits image grids and saves images into a folder based on Discord channel ID.

TLDR:

This quick and dirty script builds upon code published here: https://medium.com/@neonforge/how-to-create-a-discord-bot-to-download-midjourney-images-automatically-python-step-by-step-guide-3e76d3282871

Just follow the instructions on creating your own Discord bot, and away you go.

This bot will download all images; if the images are attachments in a message that has the text "Upscaled by" or "Image #" in the message body, they will be saved directly to the output folder. Along with the images, the corresponding message text is outputted to another folder to assist you in reconstructing your prompts should you so wish. Please remember, images have the job id imbedded in the name.

Images are saved in a subdirectory off of the one in which the script resides named "output_discordchannelname_channelid"; prompts share the same name as the images and are located in the directory "message_text". A work directory has the same format, "input_discordchannelname_channelid" .

Message the bot in whichever channel it is listening by sending a message to the channel.

               The `datehistory` format is used to specify a date range for processing images.
               It should be in the format: `datehistory: YYYY-MM-DD to YYYY-MM-DD`.
               For example: `datehistory: 2023-07-10 to 2023-07-11` will process images
               created between July 10, 2023, and July 11, 2023."

Don't forget to put your bot's token in the field "discord token"

About

a python discord bot which may be used to download images generated by midjourney using a date range. it splits image grids and saves images into a folder structure based on discord channel id.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages