# Documentation

AdminBot for LSL

This section describes how to communicate with AdminBot gateway: manage it to send the group invitation, talk over and listen to group chat etc.

## Interacting with AdminBot

The two-way communication is performed by:

* @[**Commands**](mention://20b784a3-8668-4a09-9f33-e78373dc4df1/document/58527773-45d6-4564-9b63-31771d01c0b5) (your script => AdminBot)
* @[**Events**](mention://1651679b-eec3-45dd-ad6d-598c8661b539/document/a145ef41-9f07-44aa-9f5e-f49cc4851193) (AdminBot => your script)

| EVENTS (bot => script) | COMMANDS (script => bot) |
|------------------------|--------------------------|
| Events is a notification being sent from the bot to your script (error message, group chat IM etc).<br><br>[AdminBot Events section](/doc/33f09029-62d7-4a23-80b8-c132c20a0b39) contains all events which can be sent by AdminBot to your script. | These are the commands you send to the bot (initialization, group invitation etc).<br><br>[AdminBot Commands section](/doc/9dcb1379-334a-4599-960f-2dc59be6fb90) contains the full list of the commands. |

## How to receive events

Use `link_message` LSL event to catch the events from the bot.

## How to send commands

Use LSL `llMessageLinked` function to send commands to the bot.

## Was the command successful?

Due to the nature of `llMessageLinked` function, it's not possible to retrieve the command result directly.  
However, AdminBot invokes **events** to signal the command result, available via `link_message`.

## Before Sending Any Commands

You have to **set the group name** before issuing most commands.  
See [Initializing AdminBot](/doc/ae8f6f69-20a1-443a-8a3e-ad871cbb9b68) for details.

## Examples

We've provided examples on the most important functions of AdminBot.  
They are available here: [AdminBot Examples](/doc/b8f7f4fa-241c-4ab7-b8d8-efb421361b80)

---

**Documents**

- [Status codes](https://www.mysmartbots.com/docs/s/dev/doc/status-codes-9rRgJBPbFL)
- [Initialising AdminBot](https://www.mysmartbots.com/docs/s/dev/doc/initialising-adminbot-ofN6MtFiQJ)
- [Changelog](https://www.mysmartbots.com/docs/s/dev/doc/changelog-bSMnsvfbtP)
- [Security code](https://www.mysmartbots.com/docs/s/dev/doc/security-code-z91580Exzo)