User functions

Function

Description

User.setProp(name, value)

Set property with name for user. Name is case sensitive. Read more

User.setProp("city", "London")

You can pass type also: User.setProp(name, value, type)

Type can be: integer, float, string, text, json, datetime

User.getProp(name)

Read property with name. Name is case sensitive. Read more

User.getProp("city") can get property with default value for non exist property:

User.getProp("city", "London")

can get property of another bot:

Bot.getProp({ name: "propName", other_bot_id: OTHER_BOT_ID })

User.deleteProp(name)

Delete prop by name

User.addToGroup(group_name)

Add user to group with group_name

User.addToGroup("guests")

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>")

Last updated