Nodes Browser
ComfyDeploy: How Gecco Discord Autosend works in ComfyUI?
What is Gecco Discord Autosend?
Custom nodes for ComfyUI to automatically send generated images to Discord channels.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
Gecco Discord Autosend
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
Gecco Discord Autosend
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.
Features
-
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
Installation
- Clone this repository into your ComfyUI custom_nodes directory:
``` cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/ExterminanzHS/Gecco-Discord-Autosend.git
```
- Install the required dependencies:
```
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/
- Create a .env file in the ComfyUI root directory and add your Discord bot token:
```
BOT_TOKEN=your_discord_bot_token_here
```
- Edit the channellist.py file to add your Discord channel IDs.
Discord Bot Setup
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.
Usage
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.
Configuration
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".
Alternative Installation
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.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
Author
ExterminanzHS - GitHub Profile
If you find yourself regularly using my nodes, why not buy me a coffee? BuyMeACoffee