Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/AresChat/sb0t/llms.txt

Use this file to discover all available pages before exploring further.

The Channels and Stats static objects provide read-only access to the Ares room-search channel list and runtime server statistics. Both objects are always available in scripts but reflect live data from the server at the moment they are read — they do not cache values.
Both Channels and Stats expose read-only data. Assigning to any property has no effect.

Channels

The Channels object lets scripts query the Ares room-search directory that the server participates in. Before searching, check Channels.available and Channels.enabled to confirm that channel data is ready to use.

Properties

Channels.available
boolean
true if there are channels currently available to search. Reflects whether the server has received channel list data from the Ares network.
Channels.enabled
boolean
true if the room-search feature is enabled in the server configuration.

Channels.search(query)

Searches the channel list for rooms whose names contain the given string (case-insensitive). Returns up to 10 results, sorted by user count descending. Only rooms with fewer than 200 users are included.
query
string
required
The search string to match against room names.
Returns: ChannelCollection — an array-like collection of Channel objects. The collection has a length property and numeric indexes starting at 0.

Channel Object

Each item in a ChannelCollection is a Channel object with the following read-only properties:
name
string
The display name of the room.
topic
string
The room’s current topic string.
version
string
The server software version string reported by the room.
userCount
number
The number of users currently in the room.
port
number
The data port the room is listening on.
externalIp
string
The external IP address of the room as a dotted-decimal string (e.g. "1.2.3.4").
language
number
The language code reported by the room.
A pre-generated arlnk:// link that Ares clients can use to connect directly to this room.

Examples

function onPublicText(user, msg) {
    if (msg.indexOf("!find ") === 0) {
        var term = msg.substring(6);

        if (!Channels.enabled || !Channels.available) {
            room.say("Room search is not available right now.");
            return;
        }

        var results = Channels.search(term);

        if (results.length === 0) {
            room.say("No rooms found matching: " + term);
            return;
        }

        for (var i = 0; i < results.length; i++) {
            var ch = results[i];
            room.say(ch.name + " — " + ch.userCount + " users — " + ch.hashlink);
        }
    }
}

Stats

The Stats static object exposes runtime counters for the current server session. All values are read-only and update continuously as the server runs.

Properties

Stats.userCount
number
The number of users currently connected to the server.
Stats.peakUserCount
number
The highest number of simultaneous users seen during this session.
Stats.joinCount
number
Total number of users who have joined the server since it started.
Stats.partCount
number
Total number of users who have left the server since it started.
Stats.messageCount
number
Total number of public chat messages received by the server since it started.
Stats.pmCount
number
Total number of private messages received by the server since it started.
Stats.dataReceived
number
Total bytes of data received by the server since it started.
Stats.dataSent
number
Total bytes of data sent by the server since it started.
Stats.floodCount
number
Total number of users who have been disconnected for flooding since the server started.
Stats.invalidLoginCount
number
Total number of invalid login attempts received since the server started.
Stats.rejectionCount
number
Total number of users who were refused entry to the server since it started (e.g. banned, full room).

Examples

function onPublicText(user, msg) {
    if (msg === "!stats") {
        room.say("Users: " + Stats.userCount + " | Peak: " + Stats.peakUserCount);
        room.say("Joins: " + Stats.joinCount + " | Parts: " + Stats.partCount);
        room.say("Messages: " + Stats.messageCount + " | PMs: " + Stats.pmCount);
        room.say("Data in: " + Stats.dataReceived + " bytes | Data out: " + Stats.dataSent + " bytes");
    }
}

Build docs developers (and LLMs) love