Forked from https://github.com/sALTaccount/PromptInspectorBot
Inspect prompts 🔎 from images uploaded to discord
This Discord bot reacts to any image with generation metadata from Automatic1111's WebUI and ComfyUI. If generation metadata is detected, a magnifying glass react is added to the image. If the user clicks the magnifying glass, they are sent a DM with the image generation information.
Two context menu apps are provided. One sends an ephemeral response in the channel. The other activates the emoji reaction (🔎) DM based response (useful for channels the bot isn't watching).
- Clone the repository
- Enter the directory
- Create a venv with
python3 -m venv ./venv
- Install the dependencies with
pip3 install -r requirements.txt
- Create a Discord bot and invite it to your server
- Enable the
Message Content Intent
in the Discord developer portal - Enable the
Server Members Intent
in the Discord developer portal - Create a file named ".env" in the root directory of the project
- Set
BOT_TOKEN=<your discord bot token>
in the .env file - Copy the
config.example.toml
toconfig.toml
- Add the channel IDs for channels you want the bot to watch, and set the settings you want in the
config.toml
file - Run the bot with
python3 PromptInspector.py