Nodes/comfyui_LLM_party/Discord File Monitor Node
ComfyUI Node

Discord File Monitor Node

Watch a Discord channel for incoming messages

By heshengtao·Created 2 years ago·Updated 7 days ago· 2,321
Discord File Monitor Node
    • msg_content
    interval0.10
    is_successtrue

    If discord_bot is what gets your agent connected to Discord, this node is how it actually notices anything happening there. Discord File Monitor Node polls for new incoming messages on the connection discord_bot opened, so your workflow can react to whatever gets posted - a question, an uploaded file, a command - instead of sitting there with a live bot connection that never does anything.

    How it works

    It runs a polling loop at whatever interval you set, checking for new messages since the last check, and hands back the content of what it finds. This is deliberately a polling design rather than an event callback - simpler to reason about inside ComfyUI's graph model, at the cost of introducing a small delay between something landing in Discord and your workflow noticing it. That delay is exactly what interval controls.

    The inputs and outputs that matter

    • interval (default 0.1, in seconds) - how often it checks for new messages. The default is tight - checking ten times a second - which keeps latency low but means this node is meant to run in a loop alongside an active discord_bot connection, not as a one-shot step in an otherwise linear workflow.
    • is_success (default true) - reflects whether the monitoring connection is healthy.
    • One output: msg_content - the text of whatever new message came in, ready to feed into your LLM node so the agent can respond to it.

    How to install it

    • ComfyUI Manager - search "comfyui_LLM_party", install, restart.
    • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/heshengtao/comfyui_LLM_party, then restart.

    Then pip install -r requirements.txt from inside the comfyui_LLM_party folder, in your ComfyUI Python environment (python_embeded\python.exe -m pip install -r requirements.txt on portable Windows). This node depends entirely on discord_bot already being connected - there's no separate Discord setup for the monitor itself beyond what the bot node already needs (a Developer Portal application, a bot token, and the message-content intent enabled, since Discord gates reading message text behind that explicit permission).

    Common issues & troubleshooting

    msg_content is always empty. Check that discord_bot is actually connected first (its is_success output) - this node has nothing to monitor if the bot connection never came up. After that, verify the message content intent is enabled in the Discord Developer Portal; without it, Discord won't even send your bot the text of messages, regardless of how this node is configured.

    High CPU or rate-limit warnings. A 0.1-second polling interval is aggressive. If you're seeing Discord API rate-limit errors or unnecessary load, raising interval to something like 1–2 seconds is a reasonable trade against responsiveness, especially for a workflow that isn't latency-sensitive.

    Workflow seems to hang. Because this is a polling loop meant to run continuously alongside a live bot connection, don't expect it to behave like a normal ComfyUI node that runs once and finishes - if your graph design assumes a single pass through, this node will need a different structure (a loop, or running it as its own persistent branch).

    The pack won't load at all. Separate from this node, comfyui_LLM_party has a real, current install issue where nodes fail to import after a Manager install - usually a CUDA/PyTorch mismatch with no clear compatibility list. Check that first if discord_file_monitor isn't in your node browser.

    Category大模型派对(llm_party)/APP链接(app link)

    Inputs (2)

    NameTypeDefaultDescription
    intervalFLOAT0.10
    is_successBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    msg_contentSTRING