Uwev2/src/bot.js

25 lines
587 B
JavaScript
Raw Normal View History

2017-11-07 17:22:41 +00:00
import { cfg, read } from './inc/cfg.js';
read().then(() => {
console.log( cfg );
});
/*var config = new (require(__dirname+'/inc/cfg'))();
config.read()
.then(
data => {
config.cfg = data;
var lib = new (require(__dirname+'/inc/lib'))(config.cfg);
lib.events.on('message', function(msg) {
if( msg.event[1] === 'privmsg' ) {
var e = lib.reply(msg);
console.log( `(${e.time}) ${e.network} -> ${e.channel} -> ${e.user.nick}: ${e.message}` );
}
});
},
err => {
console.log( "error! " + err );
}
)*/