Skip to main content

Flags

A Flag is a variable (property or field) that stores data of a logical type - True(1) or False(0). Thus, if when accessed, the variable returns: 0 - then the Flag is removed, if 1 - the Flag is set.

Flags can be used to mark events that have a binary nature: yes-no, exist-not exist, marked-not marked.

For example - a regular user is ABSENCE of a Flag (0 - zero), and we set a Flag for a VIP user (1 - one) - this is PRESENCE of a Flag in a variable. Thus, if the variable responsible for this returns - 1 - we know that this user is a VIP. If we again set 0 (zero) in the variable - for our system this should mean that the user has again become regular (not a VIP).

To use Flags in @MenuBuilderBot, see the functions flag_get(), flag_set(), flag_del() - in the «Expressions» section.