Skip to content

getBotList

MicroBlaster edited this page Jul 9, 2020 · 2 revisions

Purpose: Retrieves a list of all available Bots.

Syntax: getBotList Var

Var: A variable to hold the array of bots.

Notes: The result is a formatted list of strings. Use getWord or cutText if you need a specific field. The list indicates which bot is active by placing "(Active)" at the end of the string. You can also use the System Variable BOTLIST if you want to echo or send the whole list. Additional System Variables ACTIVEBOT, ACTIVEBOTNAME, ACTIVEBOTDIR, and ACTIVEBOTSCRIPT are also available.

Example:

#Send the list of bots over SubSpace.
if CONNECTED
    send "'*[General] {" ActiveBotName "} - ListBots*" BotList ""
    waitfor "Command ["
end

# Get an array of installed bots.
GetBotList $bots

# Display the list.
echo "**~CThere are ~D" $bots "~C bots installed.**"
$i := 1
while $i <= $bots
    echo $bots[$i] & "*"

    $i++
end
Clone this wiki locally