# acceptGroupOffer

Accept (or reject) a group invitation sent by another avatar.

```javascript
Bot.on("group_offer", (event) => {
  Bot.acceptGroupOffer(event.avatar_uuid, event.session_id, true);
});
```

See the [group_offer](/doc/407ce36d-0717-45d9-a456-81e7ed147c7b) event for details.

```snippet playground-input-2k8u0pPON3
`avatar_uuid` | yes | Sender avatar UUID
`session_id`  | yes | Session UUID from the event
`accept`      | yes | `true` to accept the invitation, `false` to reject
```

```snippet playground-output-RlTybcdAWF
`success` | bool   | true if command completed successfully
`error`   | string | error string if command has failed
```