Botmation Documentation

Install

Install

Botmation is written in TypeScript and runs on NodeJS v10+. You'll need both installed to compile and run the code.

Bare bones setup

If you're starting a blank new project, from your project's code directory, use npm from NodeJS and tsc from TypeScript, to initialize the environment:

npm init -y
tsc --init
touch index.ts

Now you can begin writing your bot code in index.ts file.

Install Botmation

For any bot work, you'll need at least the core Botmation package. Install via npm:

npm install --save @botmation/core

Install Puppeteer

If you haven't already, install Puppeteer:

npm install --save puppeteer

Import BotActions

Import BotActions, helpers, etc from the @botmation/core package:

import { chain, goTo, screenshot } from '@botmation/core';

All of Core's functions are documented with examples, under Core in the sidebar on the left.

Helpers are plain functions to reduce boilerplate. They are not BotActions. They are documented in their respective API pages.

Compile and run

If you're following the Bare bones setup, compile and run the code:

tsc # compile
node index.js # run

If you want to watch Puppeteer control the browser, configure it with headless: false. Otherwise, the browser window won't display when the bot runs.

Have fun 🚀

Edit this page on GitHub
Baby Bot