User functions

Function

Description

User.setProperty(name, value, type)

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

User.setProperty("city", "London", "string")

User.getProperty(name)

Read property with name. Name is case sensitive.

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

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

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