fix config things

This commit is contained in:
hgw 2023-10-02 02:11:25 +00:00
parent d491326e75
commit 5f7b7c340f

20
bot.js
View File

@ -1,19 +1,19 @@
var config = require('./config/default.json');
var irc = require("irc"); var irc = require("irc");
var config = require('config');
var fs = require("fs"); var fs = require("fs");
var readline = require('readline'); var readline = require('readline');
const { Worker } = require('worker_threads'); const { Worker } = require('worker_threads');
//var randomWords = require('better-random-words'); //var randomWords = require('better-random-words');
var bot = new irc.Client(config.get('irc.server'), config.get('irc.nickname'), { var bot = new irc.Client(config.irc.server, config.irc.nickname, {
channels: config.get('irc.channels'), channels: config.irc.channels,
secure: config.get('irc.ssl'), secure: config.irc.ssl,
port: config.get('irc.port'), port: config.irc.port,
autoRejoin: config.get('irc.autorejoin'), autoRejoin: config.irc.autorejoin,
userName: config.get('irc.username'), userName: config.irc.username,
realName: config.get('irc.realname'), realName: config.irc.realname,
floodProtection: config.get('irc.floodprotection'), floodProtection: config.irc.floodprotection,
floodProtectionDelay: config.get('irc.floodprotectiondelay') floodProtectionDelay: config.irc.floodprotectiondelay
}); });
const timer = ms => new Promise(res => setTimeout(res, ms)) const timer = ms => new Promise(res => setTimeout(res, ms))