User functions
Function | Description |
User.setProperty(name, value, type) | User.setProperty("city", "London", "string") Type can be: integer, float, string, text, json, datetime |
User.getProperty(name) | User.getProperty("city")
can get property with default value for non exist property:User.getProperty("city", "London") can get property of another bot: Bot.getProperty({ name: "propName", other_bot_id: OTHER_BOT_ID }) |
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 inBot.sendMessage("Hello, <UserRole>")
Last modified 1yr ago