discord-trigger-estrar1

Fork of n8n-nodes-discord-trigger with closeFunction patched for n8n 2.x trigger lifecycle.

Package Information

Downloads: 5 weekly / 36 monthly
Latest Version: 0.8.2-estrar1.1
Author: estrar1

Documentation

n8n-nodes-discord-trigger-estrar1

Fork of katerlol/n8n-discord-trigger (v0.8.0) with the trigger lifecycle patched for n8n 2.x.

Why this fork exists

The upstream closeFunction in nodes/DiscordTrigger/DiscordTrigger.node.ts disconnects the bot from IPC any time the n8n trigger is closed unless getActivationMode() === 'manual'. In n8n 2.x the activation mode for production triggers is typically init / update / activate, none of which match — so every workflow save (and other lifecycle events) tears down the bot connection and the trigger never re-registers, leaving the workflow active in the UI but silently inert.

What the patch changes

In closeFunction:

  1. Default isActive to true if the n8n REST API check fails, so a transient API blip can't disconnect the bot.
  2. Only call ipc.disconnect('bot') when isActive === false (i.e. the workflow has actually been deactivated). Removed the getActivationMode() !== 'manual' clause that was killing production triggers.
  3. Logs now include isActive and activationMode for easier debugging.

See the PATCH (estrar1 fork): markers in nodes/DiscordTrigger/DiscordTrigger.node.ts.

Install in n8n

After enabling community packages (N8N_COMMUNITY_PACKAGES_ENABLED=true):

  1. Settings → Community Nodes → Install a community node
  2. Enter: git+https://gitlab.com/estrar1/n8n-nodes-discord-trigger-estrar1.git

If you previously installed n8n-nodes-discord-trigger, uninstall it first to avoid two competing trigger types.

Build

pnpm install
pnpm build

Output goes to dist/. The dist/ folder is committed so npm install from a git URL works without a separate build step.

Discussion