Node Phantombot Connector
This is a NodeJS Connector for Phantombot, made to immitate (mostly) their own PHP Connector.
Installation
###Prerequisites:###
- Node.js
###Required Information:###
- Bot Address: The IP address of your bot, if you've installed PhantomBot locally this will be localhost.
- Bot Name: The Twitch username of the account your bot is using.
- Bot Oauth Token: This will be in a file called botlogin.txt, within the root of the folder you installed PhantomBot in.
###Installation:###
npm install phantombot-node-connector
###Usage:###
#Adding the Connector
var phantombot = require('phantombot-node-connector');
#Setting Options
phantombot.options = {
'host': 'localhost',
'port': 25000
'oauth': 'oauth'
}
#Get from inistore
phantombot.getTable('points', function(data) {
console.log(data);
});
#Get from Logs
phantombot.getLogFile('chat/date.txt', function(data) {
console.log(data);
});
#Get from Addons
phantombot.getAddonFile('followHandler/latestFollower.txt', function(data) {
console.log(data);
});
#Get from Web Folder
phantombot.getWebFile('style.css', function(data) {
console.log(data);
});
Return Data
Inistore request
[{variable: val, value: val2}]
Normal request
[{line: val}]