Cetera Bot Files

Posted on  by 



  1. Void Aura Cetera Bot
  2. Aqw Cetera Bot Files
  3. Cetera 10.3

AQW - Cetera Bot 10.3 Working 2019 Here is the working version of Cetera Bot 10.3 You can make your own function using bot manager. ( This bot is created by 133spider ). In this video we're going to do Nulgath (Larvae) bot for Cetera! Instructions: 1. Download Cetera and the bot 2. Add skills (see vid. To specify that the member should bot be able to view files and folders in this project, select None. To delete a project member, click in the desired project member's row. CTERA C-Series User Guide. Page 154: Editing Projects 278). Select the project. Click Manage Project. The Collaboration Project Details dialog box opens. Currently none of the bots are working except Grimoire 3.8 This bot is a little bit hard to use but it works. AQW - Revenant Bot R4.2 Working 2019 Here is the working version of Revenant bot R4.2. If your bot didn't respond to your '!Intro' in Discord, go through this wikiHow again and check to make sure your bot is set up correctly. Make sure: Node.js installed correctly. The Bot Token is entered correctly in your auth.json file. You’re in the same channel as the bot. The bot is on the server.

Using data files, it is possible to expose static data inside a bot'sscript without hard-coding it directly in Bubblescript.

This chapter explains how data files can be used inside Bubblescript,how the various data file formats work, and how you can define basicCMS features to let people easily edit these data files.

Using constants for configuration¶

Cetera 10.3

Often it is the case that your bot needs data for it to work. Forinstance, your bot might need some configuration settings,e.g. opening hours, a list of e-mail addresses that can be contacted,a general welcome text, et cetera.

There are several approaches how you could store these data.

You could 'hardcode' them in your bot, e.g. like the following:

But, when your opening hours change, you need to look in the codewhere you defined this. For this reason, weadded constants, special variablesprefixes with a @, which function as read-only constants.

This way, the logic is separated from the configuration.

However, the constants are still in the same file as thecode. Wouldn't it be nice if we had a way to define these settings onanother place?

Data files¶

This is where data files come in. As soon as you create a data file,be it either a YAML, JSON or CSV file, these files get automaticallyexposed in the bot script as a @constant with the same name as thefilename.

So it is possible to create a YAML file, for instance settings.yaml looking like this:

Files

And then the variable @settings will be exposed in yourscript. Given that this YAML file is an object, it contains a@settings.open_time and @settings.close_time property.

The dialog becomes more simple:

And the actual value of settings.close_time is stored outside thescript.

Supported data types¶

The supported types of data are YAML, JSON and CSV.

Void Aura Cetera Bot

Most of the time, you'll find yourself using YAML: an easy to read andwrite file format which uses white space to define a data structure, with lists and objects.Watch a video explanation about YAML here.

JSON¶

JSON is the JavaScript Object Notation: aformat mostly used by computers to interchange information. Use thisdata format if you have some external data that you want to staticallyincorporate in your bot, as-is. It is easy to make syntax errors withJSON, as it is picky with comma's and quotation marks.

Hint: if you need to edit the JSON later, you might want to convert it to YAML first.

Bot

CSV¶

Finally, Botsquad supportsCSV: Comma SeparatedValues, the format used by spreadsheets to present tabular data. Whencreating a CSV file, it is exposed in Bubblescript as an array ofobjects. The first line of the CSV file must contain the columnnames, and the comma (,) is used to separate the fields. Doublecheck thiswhen exporting data into the studio; some programs use the semicolon (;) bydefault.

Say, you have the following CSV file, called users:

Then you can iterate over this in Bubblescript:

Note

Data files can be made editable for non-technical users by exposing a basic Content Management System for them.

Exposing data files over HTTP¶

It is possible to expose some of the bot's data files on a HTTPendpoint. This way, by adding a Content ManagementSystem for the data, the bot can serve as aheadlessCMSfor some of your data.

Bot

To enable this, create a YAML file called http_endpoints, and create a structure like this:

Cetera

After publishing, the contents from the script named my_data_scriptwill be externally exposed on an API endpoint calledhttps://bsqd.me/api/bot/:bot_id/content/config.

The http_endpoints contains a list of entries, each of which needs to have these keys:

  • method - the request method, needs to be 'GET' currently
  • route - the part of the URL that the endpoint will be exposed on. The base URL for each entry point is always https://bsqd.me/api/bot/:bot_id/content/; the given route will be appended to this.
  • controller.type - set to 'script'; meaning the content will be served from a data file
  • controller.script_title - the script title of the data script to serve.

In the future, the HTTP endpoints functionality will most likely beextended to allow updates to the data as well as creatingalternative controller besides serving data from a data script.

Endpoint parameters¶

By default, the data that is served on the endpoints is served'un-localized'; that is; $i18n-structures inside YAML / JSON filesare returned as-is to the client. By passing in a lang= parameter,these structures are collapsed into their respective languageversions:

Aqw Cetera Bot Files

Exposing all files with the same extension¶

Cetera 10.3

Would look at all data scripts with a given extension (in this case,all scripts named *.data) and expose these as an array under asingle endpoint.





Coments are closed