0.0.4 • Published 4 years ago

tb93-extra v0.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

TB93

Examples

const tb = require("tb93");

let bot = new tb.Trollbox(new tb.User("Example Bot", "green"));

bot.on_message = msg => {
  console.log(msg, msg.user);
  if (msg.user == "jankenpopp") {
    console.log(msg.user.home);
    throw "Oh no, it's Jankenpopp!";
  }
};

bot.on_error = err => { bot.send("Error:\n" + err.toString()) }

bot.connect();

bot.use Example:

const tb = require("tb93");

let bot = new tb.Trollbox(new tb.User("Example Bot", "green"));

bot.use(function(data){console.log('Message Data:',data)})

bot.on_message = msg => {
  console.log(msg, msg.user);
  if (msg.user == "jankenpopp") {
    console.log(msg.user.home);
    throw "Oh no, it's Jankenpopp!";
  }
};

bot.on_error = err => { bot.send("Error:\n" + err.toString()) }

bot.connect();

Note

By default this library will not work on Windows93's server. You need to enable emulateBrowser to bypass the restrictions. And also this library is just an modification the original has been made by AlexApps99

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago