Custom nodes for ComfyUI to automatically send generated images to Discord channels.
Gecco Discord Autosend is a set of custom nodes for ComfyUI that allows you to automatically send generated images to Discord channels. This project includes nodes for selecting Discord channels, saving images locally, and sending images to Discord.
Select Discord channels from a predefined list
Automatically send generated images to Discord channels
Save generated images locally into a custom directory
Simple integration of a Discord Nextcord Bot with ComfyUI workflows
``` cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/ExterminanzHS/Gecco-Discord-Autosend.git
```
```
pip install -r Gecco-Discord-Autosend/requirements.txt
```
I have not added torch to the requirements.txt file, since installing it requires to use a specific link from their website: https://pytorch.org/
```
BOT_TOKEN=your_discord_bot_token_here
```
Before using the Gecco Discord Autosend nodes, you need to create a Discord bot and get its token. Follow these steps:
Go to the Discord Developer Portal.
Click on "New Application" and give your application a name.
In the left sidebar, click on "Bot" and then "Add Bot" on the right.
Under the bot's username, you'll see a "Token" section. Click "Copy" to copy your bot token.
Paste this token into your .env file as described in the installation steps.
In the left sidebar, click on "OAuth2" and then "URL Generator".
In the "Scopes" section, check "bot".
In the "Bot Permissions" section, check "Send Messages" and "Attach Files".
Copy the generated URL at the bottom of the page.
Open this URL in a new tab and select the server you want to add the bot to.
Remember to keep your bot token secret and never share it publicly.
After installation and bot setup, you'll find three new nodes in ComfyUI:
Gecco Select Channel: Use this node to select a Discord channel from your predefined list.
Gecco Autosend: This node sends the generated images to the selected Discord channel.
Gecco Image Save: Use this node to save generated images locally.
To use these nodes in your workflow:
Add the Gecco Select Channel node and choose a channel from the dropdown.
Connect the output of your image generation nodes to both Gecco Autosend and Gecco Image Save (if you want to save locally).
Connect the channel ID output from Gecco Select Channel to the channel_id input of Gecco Autosend.
Run your workflow, and the generated images will be sent to the selected Discord channel and/or saved locally.
To add or modify Discord channels, edit the channellist.py file. Add entries in the format:
"channel_name": channel_id_as_integer,
To find a channel's ID in Discord:
Enable Developer Mode in Discord (User Settings > App Settings > Advanced > Developer Mode).
Right-click on the channel you want to add and select "Copy ID".
You can also install this package directly using pip:
```bash
pip install git+https://github.com/ExterminanzHS/Gecco-Discord-Autosend.git
This will install the package and its dependencies in your Python environment.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
ExterminanzHS - GitHub Profile
If you find yourself regularly using my nodes, why not buy me a coffee? BuyMeACoffee