1.3.1 • Published 3 years ago

dancetastic-client v1.3.1

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

DanceTastic Client API

An API to generate chatbots for my site: DanceTastic(link here)

Usage

const {Client} = require("dancetastic-client");
const bot = new Client("username", "password");//initiate client
bot.init(client => {//identical to bot, but left for convenience
	client.sendUser(client.userByName("foo"), "bar");//first argument is User object, second is message
	client.on("user_message", (user, data) => {//direct message from user
		user.send(`I got ${data}`);
	});
	client.on("error", console.error);//any errors in login or message
});

Classes

Client

Base class for creating a client.

User

Base class for a non-client user.

Cateogry

Base class for a category.

Update Log

1.3.0: Added api.d.ts for typedefs.

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago