Bots.Business - Help
  • Welcome
  • Getting started
  • Create bot from Google Table
  • App
    • Reset or Update Your Password
  • Commands
    • Answer
    • Aliases
    • Keyboard
    • Groups
    • Wait for answer
    • Auto Retry (AR)
  • Coding: BJS
    • Variables
    • Bot functions
    • Message broadcasting and editing
    • User functions
    • Properties
    • Always running commands
    • Error command: "!"
    • Lists
      • Migration from properties to list
    • Api functions
    • BB Admin functions
    • Admin Panel
    • Send HTTP request
    • Web App
    • Caching
    • Inline Bot
    • BJS Security
    • Good coding practices
    • Top errors
  • Git
    • Import bot from Git repository
    • Export bot to Git repository
    • Repository structure
    • File: bot.json
    • Automatic importing on Git push
  • Iterations. How to reduce theys?
  • Limitations
  • Cloud
  • Reports
  • Deep Linking - pass any params on Bot starting
  • How to link chat account with BB account?
  • BB Inspection
  • Protected bot
  • VS Code
  • How to...
  • Smart Bot
    • Overview
    • Lang File
    • SmartBot
    • SmartTasker
    • Amount Dialog
  • Libs
    • What it is - Libs?
    • Libs development
    • RefferalLib
    • ResourcesLib
    • Random
    • MembershipChecker (MCL)
    • Cooldown Lib
    • CurrencyConverter
    • Lang
    • TopBoardLib
    • QiwiPayments
    • Coinbase (CB)
    • CoinPayments (CP)
    • OxaPay
    • CryptoJS
    • CurrencyQuote
    • GoogleApp
    • GoogleTableSync
    • Guard
    • Webhooks lib
    • DateTimeFormat Lib
  • Store
    • BB Point Bot
    • Welcome bot
    • Help bot
    • SRB Demo Keyboard Tools
Powered by GitBook
On this page

Was this helpful?

  1. Coding: BJS

User functions

PreviousMessage broadcasting and editingNextProperties

Last updated 10 months ago

Was this helpful?

Function

Description

User.setProp(name, value)

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

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.

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

Read more
Read more