Skip to Content
NexmodCounters & Variables

Counters & Variables

Counters and variables are the data layer that powers dynamic commands and automations in Nexmod. They let you store, read, and manipulate values that persist across command executions and action runs.

Counters

Counters are numeric values that can be incremented, decremented, or set to a specific value. They’re ideal for tracking things like deaths, wins, hugs, or any other countable stat.

Properties

PropertyDescription
NameUnique identifier for the counter
ValueCurrent numeric value (default: 0)
CategoryOptional grouping label
User IDOptional per-user scoping

Types of Counters

Nexmod has two counter systems:

Team Counters

Standalone counters managed from the dashboard. These exist independently and can be used across any command or action.

  • Created and managed from the Counters page in the dashboard
  • Referenced in flow nodes and message templates
  • Support categories for organization
  • Can be per-user or global

Command Counters

Counters tied to a specific command. Each command can have its own set of counters that track usage or custom values.

  • Created automatically when referenced in a command’s flow
  • Accessed via {count} (default) or {counter:name} syntax
  • Scoped to the parent command

Counter Operations

OperationDescription
IncrementAdd a value (default: +1)
DecrementSubtract a value (default: -1)
SetSet to an exact value
ResetSet back to 0

Leaderboard

Counters support a leaderboard view that ranks values. This is useful for per-user counters where you want to see who has the highest score.


Global Variables

Global variables store string values that are shared across all commands and actions. They’re the way different parts of your automation can communicate.

Properties

PropertyDescription
KeyUnique identifier for the variable
ValueCurrent string value (default: "")
PersistedWhether the value survives bot restarts (default: true)
User IDOptional per-user scoping

Use Cases

  • Last follower: Store the most recent follower’s name for display in commands
  • Current song: Updated by an external integration, read by a !song command
  • Stream status: Track custom state like “taking requests” or “sub games only”
  • API responses: Store results from HTTP Request sub-actions for use in subsequent steps

Accessing Variables

In message templates and flow nodes, use {variable:name} syntax:

The last follower was {variable:lastFollower}!

In the flow builder, use the Get Variable and Set Variable nodes.

Dashboard Permissions

ActionRequired Permission
View counters and variablesautomations:read — Viewer and above
Create, edit, deleteautomations:manage — Editor and above

Plan Limits

PlanMax Counters
Free3
PlusUnlimited
ProUnlimited
VIPUnlimited
Last updated on