(info) This AI is still in early stages of development.

chat.isBabel()

Quickly determine if a received message is in Babel format...

 

Syntax

var result = chat.isBabel(message);

Parameters

ParameterTypeMandatoryNotesAPI Version
messageString(tick)The message you want to check.1.0

Return values

ValueTypeNotesAPI Version
<result>Boolean

Is the message Babel formatted?

  • true – yes, it's Babel format, use chat.fromBabel() to decompile it.
  • false – no, it's some other format
1.0
<error>ErrorInvalid 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
	}
}
Availability BETA

Requires:

Contents

Jump to:

Babel API

Topics: