App
A JOI feature that connects several Items and Boops. It can provide App variables, defaults, mixins, a Media Library, Media Pools, Embed Templates, interactions, Sessions, and Automations.
Argument
A value supplied by a call. In Rand::pick(1..=20), the argument is the range 1..=20. A function declaration receives arguments through its parameters.
Assignment
An instruction that changes the value held by a variable, such as score += 5.
Automation
A Sugar program that an App runs hourly, daily, weekly, or monthly.
Bind arrow
The <- token. It binds Session seat state on its left to hosted Memory on its right.
bool
The scalar type for a yes-or-no value written as true or false.
Boop
A social interaction created on JOI. A Boop can use participants, variables, Sugar texts, media, Embed Templates, and an App.
Code block
Sugar code enclosed by { and }. A block groups the statements that belong to a function, branch, action, or another declaration.
Closure
An unnamed function value with the type Fn. A closure can be stored locally, passed, returned, or called. In players.filter(|player| player.ready), |player| player.ready is a closure.
Compound type
A type whose value contains or organizes related information, such as Item, Joi, Seat, Media, or List<Joi>. Compound type names use PascalCase.
Constant
A value declared with const. Sugar calculates it from its expression whenever the variables it reads change. It cannot be assigned, reset, remembered, or entered by the user.
Condition
Sugar code that answers a question, usually with true or false. JOI uses conditions to decide whether a text, media entry, or action is available.
Defaults
A configuration that changes the starting values of mutable variables in the Host scope for one linked Item or Boop. Named defaults are declared in App Main and applied by a creation with defaults name;.
Display arrow
The -> token. It gives the Sugar identity or value on its left a human-facing label on its right without changing the left side.
Definition
A named unit of behavior or presentation declared with a block, such as a function, action, automation, interaction, session, embed, chip, mixin, or defaults block. Definition names share one semantic family in Sugar and use function-colored highlighting.
Embed Template
A reusable card with optional title, description, images, footer, and fields.
Expression
A piece of Sugar that produces one value, such as score >= 10 or Rand::pick(1..=20).
Namespace
A group of related Sugar functions accessed with ::, such as Date::now() or Lore::get(). The :: token is the namespace access operator.
Function
A named callable definition. Sugar includes built-in functions, and creators can define functions for an Item, Boop, or App. An unnamed callable value is a closure with type Fn.
Interaction
Named Sugar code that responds when someone uses a button or select in a chat message. It receives the current ACTOR and may change state, continue a Session, send Sugar text, or show a private toast.
HOST
The read-only Item or Boop context currently running Sugar or using an App resource. Item actions, App Embed Templates, and hosted functions can read its public properties through the uppercase HOST constant. The lowercase host is a scope or Automation target, not the same language feature.
Hosted variable
An App variable whose scope is host, so each linked Item or Boop receives its own value. Its other declaration keywords determine whether it is mutable, persistent, or calculated.
Item
An object owned through JOI’s inventory. Items can have custom actions, variables, a Media Library, Media Pools, Embed Templates, and an App.
List
Several values kept in order, written like ("Truth", "Dare"). List positions begin at 1.
Lore
JOI’s score and economy value. Supported Sugar programs can read, charge, transfer, or reward Lore.
Mapping arrow
The => token. It maps a configuration name, match pattern, or random weight on its left to a value or result on its right.
Media Library
The named images and videos uploaded to an Item, Boop, or App. Sugar references a library resource as &name.
Media Pool
A named Sugar declaration that groups Media Library resources for random selection. Pools can extend other pools, replace inherited candidate conditions, and exclude candidates.
Memory variable
A variable declared with mem var. JOI remembers its latest value for the next use.
Mixin
Reusable contextual Sugar source declared in App Main and inserted with include. A mixin may accept parameters and must expand to valid code where it is included.
Module
One complete Sugar source document for a creation. Item Code contains top-level variables, functions, embeds, Media Pools, actions, defaults, and mixin inclusions. Boop Code contains top-level variables, functions, embeds, Media Pools, texts, defaults, and mixin inclusions. App Main contains shared variables, functions, embeds, Media Pools, named defaults, and mixins.
None
None means there is no value. Optional inputs and operations that may not find a result can produce None.
Object
Several related values with names, written like { name: "Key", uses: 3 }.
Participant
A JOI involved in an Item action or Boop. Participant 1 is always the JOI using it.
Parameter
A local name declared by a function, embed, mixin, interaction, or closure to receive a value. A call supplies an argument for that parameter.
Player variable
An App variable whose scope is player, so each registered JOI owns a separate value.
Program
One or more Sugar instructions that run in order.
Property
One named value inside an object. In item.name, name is the property.
Result
The text, chips, media, dice, and embeds produced by an Item action or Boop.
Return
The value a function gives back to its caller. A creator function automatically returns its final expression. return can stop it earlier.
Scalar type
A type that holds one direct value. Sugar’s scalar types are str, number, and bool, and their names are lowercase.
Sandbox Mode
The safe test available from Item and Boop Code editors. It shows what would happen without posting or saving changes.
Session
Shared App state bound to one chat and up to six JOI-and-Item seats. A Session begins as a lobby when it needs more players and becomes active when its owner starts it.
Scope
A modifier that says where an App declaration belongs. App variables use player, app, or host. Automations use the same words to choose which targets run their programs.
str
The scalar type for a string of characters, written inside quotation marks. It is separate from a Sugar text, which is a possible message declared with text.
App-wide variable
An App variable whose scope is app, so the App owns one value shared by everyone.
Statement
One instruction in a program. Statements are usually separated with semicolons.
Sugar text
One possible message produced by an Item action or Boop. It is declared with text, and it may contain participant mentions or a Sugar program.
Temporary variable
A variable created with let. It exists only while the current program runs.
Type
A description of the kind of value Sugar may use, such as str, number, Item, Fn, or List<Joi>.
Type annotation
An explicit type written after : in a declaration. In var health: number = 100;, : number is the type annotation.
Type argument
A type placed between < and > to configure another type. In List<Joi>, Joi is the type argument and means every list entry is a Joi value. Any Sugar value type can be used, including scalar and nested list types.
Variable
A name that holds a value.