Members

AliveEnergy

amount of energy

Properties
TypeDescription
Energy
Default Value
  • null
Example
world = this.world
function test() {
 return world
}

Methods

(generator) fibonacci() → {number}

Generate the Fibonacci sequence of numbers.

Yields:

The next number in the Fibonacci sequence.

Type: 
number

initSqlJs(config) → {SqlJs}

Asynchronously initializes sql.js

Parameters:
NameTypeDescription
configSqlJsConfig

module initialization parameters

Returns:
Type: 
SqlJs
Example
initSqlJs({
 locateFile: name => '/path/to/assets/' + name
}).then(SQL => {
 const db = new SQL.Database();
 const result = db.exec("select 'hello world'");
 console.log(result);
})

Type Definitions

EnergyUnit

Type:
  • Object
Properties
NameTypeDescription
fooString

kajsdh kajhsd

helloArray.<Array.<String>>

aksjdh kaj shdkj asd

EnvironmentConfiguration

Type:
  • Object
Properties
NameTypeDescription
nameString
strangeMap.<String, Number>

PhotoSize

This object represents one size of a photo or a file / sticker thumbnail.

Type:
  • object
Properties
NameTypeAttributesDescription
file_idstring

Identifier for this file, which can be used to download or reuse the file

file_unique_idstring

Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.

widthnumber

Photo width

heightnumber

Photo height

file_sizenumber<optional>

Optional. File size in bytes

SqlJs

Type:
  • Object
Properties
NameTypeDescription
DatabaseDatabase

A class that represents an SQLite database

StatementStatement

The prepared statement class

SqlJsConfig

Type:
  • Object
Properties
NameTypeDescription
locateFilefunction

a function that returns the full path to a resource given its file name