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
| Feature | Tags | Triggers |
|---|---|---|
| Trigger Type | Command prefix (!tag) | Chat message (phrase or word) |
| Database Storage | MongoDB tags | MongoDB triggers |
| Argument Handling | Numbered positional {1}, {2} | Inherits full message |
| Response Format | Embeds, Text, Files | Embeds, Text, Files |
| Audio Controls | Play, Skip, Loop, Volume, Tune | Play, Skip, Loop, Volume, Tune |
| Cooldowns | Supported ({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
- Check out the Quickstart Guide to create your first tag in 60 seconds.
- Learn the TagScript Syntax & Anatomy.