Updates from R34
The R34 release of Zweb Booking Bot is meant to significantly improve the overall experience and allow for the presence of a whole companion web application: the admin panel. The panel will be packed with the bot starting from version R36, but its use is completely optional. The configuration structure has undergone some major changes and included some new entries in order to prepare the bot for future updates (such as the admin panel) and at the same time to improve the code organization.
Main updates in the JSON end .env config files
Here is a short list of the main news:
- From now on, it is recommended to put the config file inside
assets/user_config
folder, while not mandatory. - The first level options appearing in the json file will display 1 or 0 instead of true or false, for smarter compatibility with the admin panel and the database
- All text strings concerning time have been moved under the
text
object; this way, all the strings will be translatable from the admin panel editor, and the config file is more intuitive; - Duration options can be specified inside a service to override the general duration options (it is recommended, however, to keep at least one generic duration option: the bot needs to find at least one duration option in the hierarchy)
- Now some duration options can be hidden from customers and shown only to the service manager, in order to let them reserve or block a service more easily, especially if that duration is not suitable for the customer or does not make sense. In order to make a duration option reserved, add the property:
"reserved_to_keeper": 1
inside a duration option object. ask_note_text
: if this property is put inside a service object, instead of asking for confirmation of the reservation, the user will receive this text message and be asked to write a note: the note will override their personal name as reservation name in the ticket AND in the database!admin_color
: This will be used, inside each service, to show a colored curve of the reservations month by month in a chart that will appear in the homepage of the admin panel. If missing, default color is blue.day_off_code
: Here you have to specify a short, upper/snake-case code, like "DAY_OFF", that is how you the day off pseudo-service is recognized in the bot. Recommended for future compatibility: maximum 7 characters.PRIMARYCONFIG
: this options has been added in the .env file. Now you will be able to specify 'db' or 'file' as your main options source. Until the admin panel release, only 'file' will be working and you don't need to change anything.- New translation strings have been added to the text object of the json config file.
- Telegram Id(s) belonging to the service manager(s) can now be inserted only inside the .env file, just like the other sensitive data.
- A service's
short_name
property is to retain only a cosmetic function. Wherever it was used,code
property is now used instead.