This AI is still in early stages of development.
chat.isBabel()
- Aubergine
Owned by Aubergine
Quickly determine if a received message is in Babel format...
Syntax
var result = chat.isBabel(message);
Parameters
Parameter | Type | Mandatory | Notes | API Version |
---|---|---|---|---|
message | String | The message you want to check. | 1.0 |
Return values
Value | Type | Notes | API Version |
---|---|---|---|
<result> | Boolean | Is the message Babel formatted?
| 1.0 |
<error> | Error | Invalid parameters passed to function. | 1.0 |
Example
function eventChat(sender, to, message) { if (chat.isBabel(message)) { // process babel-formatted message } else { // process other kinds of message } }
Contents
Jump to:
Babel API
Topics:
- Data types — Babel supports most types of data...
- Error Dialect — A specific dialect for reporting errors within Babel...
- Babel on Warzone 3.1 — Babel handles Warzone 3.1 gracefully...
- Position-like Objects — If your data has {x, y} properties, Babel treats it like a Position object...
- chat.toBabel() — Compiles a Babel format message, ready for sending to your AI buddies...
- chat.isBabel() — Quickly determine if a received message is in Babel format...
- chat.fromBabel() — Converts a Babel format message in to an array...
- Handling Dialects — Some ideas on how to handle multiple dialects...