Economy · Step
Buy item
Spend coins on an inventory item, if they have enough.
econ.buy
In a flow
“When a button is clicked, buy item.”
Buy a VIP ticket for 500 coins
What it does
Spend coins on an inventory item, if they have enough. It's a step: it runs when the white wire reaches it, then the flow carries on from its Then pin. It gives 3 values later steps can use. Find it under Economy in the palette.
When to use it
Use it for the server's economy: spend coins on an inventory item, if they have enough.
When not to
If nothing should change in Discord, a value node or a check is lighter.
Typical wiring
Sockets: settings you can wire
- Item Text needed
-
The item's name, like Sword or VIP ticket. Case doesn't matter. Variables allowed.
What goes there: Type it in the side panel, or wire in text. e.g. Hello there
If it's empty: Needed. Publish lists it until it's set or wired; the step can't run without it.
Connects fromA member's variablesAccept applicationAdd a Notion pageAdd a Trello cardAdd an emojiAdd to number in objectAdd up timesAdd working daysand 844 more
- Price Number
-
What one costs, like 250.
What goes there: Type it in the side panel, or wire in a number. e.g. 42
If it's empty: Optional. Left empty and unwired, it uses 100.
Connects fromA member's variablesAccept applicationActive membersAddAdd a forum tagAdd a labelAdd a row to a Google SheetAdd a staff noteand 500 more
- How many Number
-
How many to buy, 1 to 100.
What goes there: Type it in the side panel, or wire in a number. e.g. 42
If it's empty: Optional. Left empty and unwired, it uses 1.
Connects fromA member's variablesAccept applicationActive membersAddAdd a forum tagAdd a labelAdd a row to a Google SheetAdd a staff noteand 500 more
Values it gives
- Bought Yes / no
-
False when they couldn't afford it. e.g. true
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd a forum tagAdd onboarding questionAdd to a counterAlarms that are dueAndAutoMod: Discord's word listsBluesky latest postBoard as emojiand 572 more
- Balance Number
-
Their balance after the step. e.g. 1250
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 718 more
- They have Number
-
How many of the item they have now. e.g. 1
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 718 more