Members
Bot :Object
The bot instance object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
language |
String | The language of the brain |
path |
String | The path to the rivescript brain files |
config |
Object | A config object to send to rivescript |
variables |
Object | variables file to fill subs in rivescript - template |
- Source:
BotConfig :Object
The bot options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
use_permanent_bot_user |
Boolean | A flag to tell the bot if it can use permanent user save or just cache |
typing_delay |
Boolean | A flag to tell the bot if has any delay in bot response |
typing_time |
Number | The time used for calculate the delay time in typing (characters per second) |
time_for_typing_on |
Number | The minimum delay time to show 3 dots in bot responses, |
humanize |
Boolean | The flag to tell the bot if it can humanize it's responses, |
humanize_subs |
Boolean | The flag to tell the bot if it can humanize subs in brains, |
typing_error_chance |
Number | The amount of chance of error in bot response (if humanization is on) - from 0.0 to 1.0 |
- Source:
BotOptions :Object
The options object used for bot configuration
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
env |
String | A string with an environment flag |
instances |
Array.<Bot> | Array object with bot instances |
assets_url |
String | The path to assets to be used as attachment, |
scripts |
Object | Scripts object with functions to be used in rivescript - template |
attachments |
Object | Attachments object with files to be used in rivescript - template |
menus |
Object | Menus object with menus to be used in rivescript - template |
texts |
Object | Texts object with text and localization to be used in rivescript - template |
humanization |
Object | Humanization object with text words to be used in rivescript - template |
custom_user |
Object | Custom user object controller to send extra data to rivescript by user_data variables - template |
dispatcher |
DispatcherConfig | Dispatcher options |
facebook |
FacebookConfig | Facebook options |
database |
DatabaseConfig | Database options |
botconfig |
BotConfig | Bot options |
debugconfig |
DebugConfig | Bot debug options |
accept_commands_from_user |
Boolean | Flag to allow the bot to receive commands like cmdxxx from the user input |
- Source:
DatabaseConfig :Object
The database options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
config |
Object | A Database config used by mysql-promise |
user_table |
String | The name of user table in your database if any |
pages_table |
String | The name of pages table in your database if any |
storage_table |
String | The name of storage table in your database if any |
- Source:
DebugConfig :Object
The bot debug options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
sqlerror |
Boolean | Flag to log an error for sql |
dispatchcomplete |
Boolean | Flag to log every time a dispatch is completed |
userdataupdate |
Boolean | Flag to log every time the bot makes a user data update |
attachment_debug |
Boolean | Flag to log an attachements dispatch |
event_response |
Boolean | Flag to log an event response |
user_response |
Boolean | Flag to log an user response |
message_dispatched |
Boolean | Flag to log every time a message id dispatched |
facebook_send_object |
Boolean | Flag to log an object before it is sent to facebook |
facebook_template_object |
Boolean | Flag to log an template before it is sent to facebook |
facebook_response |
Boolean | Flag to log a facebook response |
update_response |
Boolean | Flag to log an update response |
bot_userdata |
Boolean | Flag to log the bot user data |
- Source:
DispatcherConfig :Object
The dispatcher options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
time |
String | time flag to be used in node-cron |
function |
function | The function to dispatch with cron at given time |
- Source:
EntityConfig :Object
The entity object used by the bot
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
name |
String | The name of the entity |
entries |
Array.<WordConfig> | The array of words and it's synonyms |
- Source:
Event :Object
The event object used by the bot
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
fb_page |
PageConfig | A page object |
sender |
String | The facebook user pid |
type |
String | The type of the message (message|payload|attachment) |
text |
String | The message text, |
id |
String | The attachment id, |
lang |
String | The message language |
- Source:
FacebookConfig :Object
The facebook options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
send_to |
Boolean | A flag to tell the messenger controller to send responses to facebook |
graph_url |
String | The facebook graph API url |
version |
String | The facebook graph API version |
login_appID |
String | The facebook APP ID used for login |
login_appSecret |
String | The facebook APP Secret used for login |
verify_token |
String | Token used for the facebook challenge on set webhook |
pages |
PageObjectConfig | Object with facebook pages configured in this bot |
- Source:
PageConfig :Object
The page object used by the bot to identify the facebook page
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
id |
String | The id of the page |
token |
String | The token of the page |
language |
String | The language of the page (Optional) |
data |
Object | A callback object (Optional) |
- Source:
PageObjectConfig :Object
The facebook page object - This object is created with a string as key (page id) and with an object with properties below - Eg: {"123456789789787": {}}
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
language |
String | The language of the page |
type |
String | The environment flag of the page |
appID |
String | The facebook APP ID used for this bot |
pageToken |
String | The page token generated by facebook |
- Source:
UserResponse :Object
The user response options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
response |
Object | Boolean | An user object returned by mysql or cache or false if none |
data |
String | The facebook data response |
- Source:
UserUpdateResponse :Object
The user update response options object
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
status |
Boolean | The status of the response |
data |
String | The user data from the table | cache |
- Source:
WordConfig :Object
The word object used by entities
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
value |
String | The base word |
synonyms |
Array | The word array with the synonyms |
- Source: