# User functions

| Function                      | Description                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `User.setProp(name, value)`   | <p>Set property with name for user. Name is case sensitive. <a href="/pages/CA4h2VsH9l6J3MNHXvdW#set-property">Read more</a></p><p></p><p><code>User.setProp("city", "London")</code></p><p></p><p>You can pass type also: <code>User.setProp(name, value, type)</code></p><p>Type can be: <code>integer, float, string, text, json, datetime</code></p>                                                                        |
| `User.getProp(name)`          | <p>Read property with name. Name is case sensitive. <a href="/pages/CA4h2VsH9l6J3MNHXvdW#get-property">Read more</a></p><p></p><p><code>User.getProp("city")</code><br><br>can get property with default value for non exist property:</p><p><code>User.getProp("city", "London")</code></p><p></p><p>can get property of another bot:</p><p><code>Bot.getProp({ name: "propName", other\_bot\_id: OTHER\_BOT\_ID })</code></p> |
| `User.deleteProp(name)`       | Delete prop by name                                                                                                                                                                                                                                                                                                                                                                                                             |
| `User.addToGroup(group_name)` | <p>Add user to group with group\_name</p><p></p><p><code>User.addToGroup("guests")</code></p>                                                                                                                                                                                                                                                                                                                                   |
| `User.getGroup()`             | Get current user's group                                                                                                                                                                                                                                                                                                                                                                                                        |
| `User.removeGroup()`          | Remove user from current group                                                                                                                                                                                                                                                                                                                                                                                                  |

**Access to property** in answer:

> You can also use the properties in the command's answer. For example, you can do this with the / hello command:`Hello, <UserRole>!`

in BJS:

> And you can use it in `Bot.sendMessage("Hello, <UserRole>")`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.bots.business/bjs/user-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
