# SB_CHAT_MESSAGE

Raised when bot receives the group chat message.

## Event usage

```csharp
link_message(integer sender, integer cmd,  string data,  key id) {
    if(cmd == SB_CHAT_SUCCESS) {
        llOwnerSay("Event " + cmd + " arrived! Data:\n" + data);
    }
}
```

## Event parameters

link_message event receives cmd, str and id parameters. Their meaning for `SB_CHAT_SUCCESS` event is explained below:

| Variable | Type | Description |
|----------|------|-------------|
| cmd      | integer | the `SB_CHAT_SUCCESS`'s numeric ID |
| data     | string | Contains resident name and message, joined by ": ". Example: Glaznah Gassner: Hello there! |
| id       | key  | Resident UUID |

## Comments

Remember that Group Chat SmartBots service must be activated for the group.