TagScript Engine
Think of TagScript as the “brain code” for your server. It’s a powerful and flexible scripting language that lets you build complex automation by combining dynamic variables, logic gates, and server actions.
🧠 Why Use TagScript?
Section titled “🧠 Why Use TagScript?”Plain text is static. TagScript is alive. With TagScript, your bot can:
- Personalize Messages: Address users by their display name or current role.
- Perform Conditional Actions: If a user has a specific role, do X. If not, do Y.
- Automate Moderation: Build buttons that automatically kick, ban, or mute users.
- Calculations: Perform math on the fly for levels, shop systems, and more.
🧱 The Anatomy of a Tag
Section titled “🧱 The Anatomy of a Tag”TagScript tags always look like this: {tag:value}. They can be simple variables or complex instructions.
Common Variables
Section titled “Common Variables”These are your bread and butter for personalization:
{user}: Mentions the user.{user.id}: The user’s unique ID.{guild}: Your server’s name.{memberCount}: The current number of members.{channel}: Mentions the current channel.
Logic & Math
Section titled “Logic & Math”Need to make decisions or calculations?
{if(value1 == value2):result_if_true|result_if_false}: A standard “If/Then” statement.{random:option1|option2|option3}: Pick one at random (great for giveaways!).{math:15 + 5}: Perform calculations instantly.
Discord Actions (Staff Only)
Section titled “Discord Actions (Staff Only)”Advanced tags that can actually change your server. Use these ONLY in staff-protected snippets or embeds:
{kick:reason}: Performs a kick action.{ban:reason}: Performs a ban action.{role:+Role Name|-Role Name}: Add or remove roles from a user.{react:👍}: Automatically add a reaction to the message.
🚀 Where to Use TagScript
Section titled “🚀 Where to Use TagScript”You can use TagScript in several places across Zero Degree:
- Welcome Messages: Personalize your server’s greeting.
- Interactive Buttons: Create a button that runs a script when clicked.
- Embed Builder: Add dynamic content to any part of your custom embed.
- Message Snippets: Build powerful shortcuts for common staff actions.
🛠️ Example Snippets
Section titled “🛠️ Example Snippets”Scenario: The Role-Giver Button
Section titled “Scenario: The Role-Giver Button”Want a button that gives a “Community” role?
{role:+Community} Welcome to the inner circle, {user}!
Scenario: Randomized Fun
Section titled “Scenario: Randomized Fun”Zero Degree says: {random:Have a great day!|Don't forget to hydrate!|Stay cool!}
[!WARNING] Safety First! Because TagScript can perform moderation actions like kicking and banning, always test your scripts in a private channel before making them public.