1.1.0 • Published 5 years ago

ancapism-client v1.1.0

Weekly downloads
3
License
ISC
Repository
-
Last release
5 years ago

Ancapism Node.JS Client

A client for Ancapism

Docs are at http://docs.tbk321.com/

First Program

NPM is the reccommended way to obtain Ancapism Client. npm i -s ancapism-client To use it, simply import the pacakge, and create a new Client. TS: import { Client, emotes, directions } from "ancapism-client" JS: const { Client, emotes, directions } = require("ancapism-client")

Check the docs for more information on the emotes and directions variables. They are utilities to help you with movement and emoting. Optionally, you can also supply another argument updateInterval which is the speed at which we will request chunks & data from the server in milliseconds. 10000 is the default and reccommended value.

The new client variable has a few diffrent events, but you should mostly be concerned with the "ready" event. client.on("ready") will be fired when the client is logged it. It is highly reccommended that you put all of the code interacting with the client here unless it is tied to another event like "message" or "debug". Check the docs for all of the events.

Sample program:

"TypeScript";
import { Client, emotes, directions } from "ancapism-client";
"JavaScript";
const { Client, emotes, directions } = require("ancapism-client");

const client = new Client("http://derpy.live:1338", "botuser101", "supersecurePasswd");

client.on("ready", () => {
    client.send("Hello world!");
    setInterval(() => {
        client.move(directions.northX, directions.northZ);
    }, 1000);
});

client.on("debug", console.log);
1.1.0

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago