kajgg-chatlib
v0.1.0
Published
typescript api + gateway client for kaj.gg
Readme
chatlib-ts (kaj.gg)
install
npm i kajgg-chatlibquickstart
const { Client, Events } = require("kajgg-chatlib");
const client = new Client({
baseUrl: "http://localhost:8080",
});
client.once(Events.ClientReady, (readyClient) => {
console.log("ready");
});
client.on(Events.MessageCreated, async (ctx) => {
await ctx.send("yo");
});
// either pass a token string, or pass username/password
client.login({ username: "username", password: "password" });