A Discord bot that turns image posts into dated, captioned polaroids and organizes them into a searchable local photo journal.
PhotoJournal watches selected Discord channels, saves image attachments by date, generates a polaroid-style copy with the message text, and provides commands for browsing, searching, exporting, and archiving the collection.
Status: working prototype with image processing, local journal storage, search, export, and Discord commands.
- watches configured channels for image attachments
- stores original and polaroid versions in date-based folders
- adds a caption and timestamp with Pillow
- writes text sidecars for local caption search
- lists, retrieves, and randomly selects journal images
- exports a day as a ZIP archive
- downloads logs by date/channel through Discord commands
- supports caption regeneration
- includes age-based cleanup and moderator purge commands
The repository includes test_polaroid.jpg as an example of the generated polaroid format.
- Python
- discord.py
- Pillow
- aiohttp
- python-dotenv
python -m venv .venvWindows:
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtmacOS/Linux:
source .venv/bin/activate
python -m pip install -r requirements.txtCreate a local .env file:
DISCORD_TOKEN=your-bot-token
Never commit the token. Enable the Discord message-content intent for the bot application.
Edit these constants in bot.py before running:
CHANNEL_NAMESIMAGE_ROOTMAX_IMAGE_SIZE_MBFONT_PATH
python bot.pyUse !helpme in Discord for the current command list.
The bot saves Discord attachments and message captions to local storage. Server members should know what is retained, where it is stored, and who can access it.
!cleanupdays deletes local files, and !purge deletes Discord messages. Review and restrict command permissions before inviting the bot to a real server. Back up the journal before testing cleanup behavior.
- most commands do not consistently restrict channel names or file paths
- the configured maximum upload size is not currently enforced
- some cleanup commands are broader than their help text suggests
- a new aiohttp session is created for each attachment
- failures are printed or sent directly without structured logging
- files are stored locally with no retention policy or backup mechanism
- enforce attachment limits and safe path handling
- add explicit authorization checks for cleanup/archive commands
- test image rendering independently from Discord
- add configurable retention and storage limits
- reuse one HTTP session and add graceful shutdown
- add Docker or service deployment documentation
- create a privacy-safe demonstration server and GIF
Created by SimpleCaci. A project license has not yet been selected.