# 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**](/doc/commands-WCb7V8L8hH) (your script => AdminBot)
* [**Events**](/doc/events-FoETLneBa3) (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/events-FoETLneBa3) 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/commands-WCb7V8L8hH) 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/initialising-adminbot-8QmVmfT7vb) for details.

## Examples

We've provided examples on the most important functions of AdminBot.  
They are available here: [AdminBot Examples](/doc/examples-DF6z2SxxfH)

---

**Documents**

- [Initialising AdminBot](https://sb-docs-dev.getoutline.com/s/dev/doc/initialising-adminbot-8QmVmfT7vb)
- [Changelog](https://sb-docs-dev.getoutline.com/s/dev/doc/changelog-Z1sEnbRbUX)
- [Security code](https://sb-docs-dev.getoutline.com/s/dev/doc/security-code-Oi9lp17Mlc)
- [Status codes](https://sb-docs-dev.getoutline.com/s/dev/doc/status-codes-ScdJkEfOkB)