Skip to content

Introduction & Philosophy

What is Eruptor’s Tag & Trigger Engine?

Eruptor provides a dual-layer automation platform. It allows anyoneβ€”regardless of programming backgroundβ€”to write dynamic scripts that run inside Discord messages.

Whether you want to create an auto-DJ that suggests songs, build interactive player cards, or tune equalizer frequencies with custom commands, Eruptor’s engine makes it effortless.


Tags vs. Triggers: What’s the Difference?

In Eruptor, there are two distinct ways a script is triggered:

1. Tags (Prefix-Based Commands)

Tags act like custom bot commands that start with your server’s prefix (e.g. !np, !radio, !stats).

  • Invocation: !<tagname> [arguments]
  • Arguments: Passed explicitly to the tag using {args}, {1}, {2}, etc.
  • Primary Use Case: Custom server commands, utility lookups, role assigners.

2. Triggers (Natural Language Auto-Responders)

Triggers run automatically when members type specific words or phrases in chat without needing a command prefix.

  • Invocation: Typing suggest, chill, player info, etc.
  • Matching Priority: Exact phrase match β†’ First word match β†’ Keyword match.
  • Primary Use Case: Smart chat auto-responses, voice channel helpers, interactive music games.

Comparison Matrix

FeatureTagsTriggers
Trigger TypeCommand prefix (!tag)Chat message (phrase or word)
Database StorageMongoDB tagsMongoDB triggers
Argument HandlingNumbered positional {1}, {2}Inherits full message
Response FormatEmbeds, Text, FilesEmbeds, Text, Files
Audio ControlsPlay, Skip, Loop, Volume, TunePlay, Skip, Loop, Volume, Tune
CooldownsSupported ({cooldown(n)})Supported ({cooldown(n)})

The Life of a Tag: From Message to Execution

Here is the exact step-by-step lifecycle when a message is sent in your server:

1. Member sends message in a text channel
β”‚
2. Eruptor checks if author is a bot (bots are ignored)
β”‚
3. Check prefix:
β”œβ”€β”€ If message starts with Prefix βž” Lookup in Tag database
└── If no Prefix βž” Lookup in Trigger database
β”‚
4. Eruptor constructs live Context Transformers:
β”œβ”€β”€ {track} βž” Current track title, artist, thumbnail, URI
β”œβ”€β”€ {player} βž” Volume, playback state, queue length, time remaining
β”œβ”€β”€ {filter} βž” Active DSP filter preset, available filter list
β”œβ”€β”€ {user} βž” Username, avatar, user ID, discriminator
└── {server} βž” Member count, server name, server icon
β”‚
5. TagScript AST Interpreter parses the template:
β”œβ”€β”€ Resolves nested variables ({track.title}, {player.volume})
β”œβ”€β”€ Evaluates conditions ({if({player.playing}==true):...|...})
└── Resolves dynamic live search ({suggest}, {random})
β”‚
6. Side-Effects & Actions are executed:
β”œβ”€β”€ Audio Actions (Play song, apply {tune}, set {volume})
└── Discord Actions (Check permissions, trigger cooldown, delete message)
β”‚
7. Eruptor sends the formatted Embed or Message back to the channel!

Next Steps