mrnodebot
Version:
Your Friendly NodeJS IRC Bot
431 lines (430 loc) • 13.9 kB
JavaScript
module.exports = {
// We are using a local version of the IRC client
// To use this you must have a node-irc directory at a child level
// of the MrNodeBot directory
ircClientDebug: true,
// Project Config
project: require('./package.json'),
// Bot specific
bot: {
debug: true,
debugLevel: 'info',
webDebug: true,
webDebugLevel: 'info',
disableScripts: false,
// Effects SSL on Requests
strictTLS: false,
// Script Directories
scripts: [
// Core Libs
'/scripts/lib',
// Data Generators (Promises)
'/scripts/generators',
// Express end points
'/scripts/pages',
// Single Point commands
'/scripts/commands',
// Administrative commands
'/scripts/admin',
// Owner commands
'/scripts/owner',
// Listeners
'/scripts/listeners',
// Scripts that have mix of everything
'/scripts/modules',
// Fsociety Module -- For #fsociety on Freenode
'/scripts/fsociety',
// URL Listener feature
'/scripts/urlListener',
// Only load in development
'/scripts/beta',
],
// Model Directories
models: [
'models',
],
// Currently running Environment
env: 'devel',
},
localization: {
debug: false,
lng: 'en',
defaultNS: 'app',
fallbackLng: 'en',
initImmediate: false,
whitelist: ['en'],
saveMissing: true,
saveMissingTo: 'current',
ns: ['app', 'libraries'],
preload: ['en'],
load: 'current',
},
socketIO: {
logging: true,
},
// User Manager configuration
userManager: {
salt: 'samplesalt',
keyLength: 64,
},
// Command aliasinging
commandBindings: [{
command: 'update',
alias: 'upgrayeddd',
}, {
command: 'reload',
alias: 'refresh',
}, {
command: 'token',
alias: 'upload-token',
}],
// Owner configuration
owner: {
nick: 'IronY',
host: 'unaffiliated/irony',
},
// Irc Client Configuration see https://node-irc.readthedocs.io/en/latest/API.html#client
irc: {
nick: 'ChubbyBreakfast1',
server: 'irc.freenode.net',
// server: 'irc.dal.net',
userName: 'MrNodeBot',
realName: 'MrNodeBot',
port: 6697,
localAddress: null,
debug: false,
showErrors: true,
autoRejoin: true,
channels: [
'#mrnodebot2',
],
secure: true,
selfSigned: false,
certExpired: false,
floodProtection: true,
floodProtectionDelay: 500,
sasl: false,
retryCount: 100,
retryDelay: 2000,
stripColors: false,
channelPrefixes: '&#',
messageSplit: 480,
encoding: 'utf8',
password: 'Eliteroot01$',
},
// Knex configuration http://knexjs.org/#Installation-client
knex: {
enabled: true,
engine: 'mysql',
mysql: {
client: 'mysql2',
connection: {
host: '192.168.1.3',
user: 'mrnodebot',
password: '98Jenny01$',
database: 'mrnodebot',
charset: 'utf8mb4',
},
},
sqlite: {
client: 'sqlite3',
database: 'mrnodebot',
connection: {
filename: './data.sqlite',
},
},
},
// Log.io Information
logio: {
enabled: true,
nodeName: 'MrNodeBot',
port: 28777,
host: '127.0.0.1',
},
// Pusher.io Information
pusher: {
enabled: true,
config: {
appId: '244853',
key: '9d0bcd17badf5ab7cc79',
secret: 'e908371cdc0cf62732e5',
},
},
// Nickserv configuration options
nickserv: {
password: 'Eliteroot01$',
nick: 'NickServ',
host: '', // services.dal.net for Dalnet, empty for Freenode
accCode: '3',
},
// API Keys
apiKeys: {
mashape: 'YBPjf46ukNmshQdbGebMf72ltv1Lp1uqrsqjsns56modG8SOY0',
imgur: {
clientId: '047ca676177bd40',
clientSecret: 'e0635d67c7c31f100f38ee4f53b8bb7c63e7284b',
},
omdb: 'f10b9623',
google: 'AIzaSyB0CIYkKkYWfH3bOghqUt8l7o-IQg21mjA',
twitter: {
consumerKey: 'Z8iPRtOWUPo7BRSK40uyFGejx',
consumerSecret: 'xeahydnS86X4srpTYZhxXIwMVWOKDWSqAAIe9oEAleYyjJy2Ax',
tokenKey: '760193779638730752-zq71Q1K77cdvEorKfsvylAz0KW8rxNh',
tokenSecret: '7sN5h17Xx9IEs5pSlRULggWIfpI0ZRaioumHAWXEiYlC1',
},
watson: {
alchemy: {
url: 'https://gateway.watsonplatform.net/natural-language-understanding/api',
username: '82cb284e-f16b-4a2c-8e14-355ad88433d4',
password: '8uAS3YRAOuCT',
apikey: 'SrIaV1i19w46snJjuFbzWsqzEl3ocfbom01RP7RtAW27',
},
personality: {
url: 'https://gateway.watsonplatform.net/personality-insights/api',
username: '871f24e6-08b4-434c-9a8e-7ccb9c94afa5',
password: 'LIqvUkgOZvpE',
apikey: 'SrIaV1i19w46snJjuFbzWsqzEl3ocfbom01RP7RtAW27',
},
},
worldWeatherOnline: {
key: '2b5e833bacf14045ab9211221161712',
},
bitly: '653043631599f25eba279be197ee24a8ca31c5ce',
},
// Git Log configuration
gitLog: {
repo: __dirname,
number: 5,
fields: [
'subject',
'authorName',
'authorDateRel',
'abbrevHash',
],
},
// Command access levels
accessLevels: {
guest: 0,
identified: 1,
admin: 2,
owner: 3,
channelOp: 4,
channelVoice: 5,
channelOpIdentified: 6,
channelVoiceIdentified: 7,
},
// Express Configuration
express: {
port: 8084, // Bind Port
address: 'http://192.168.1.2:8084', // Bind address
forwarded: false, // Indicate the site is behind a Http proxy
noFollow: true, // Prevent the express routes from being indexed by spiders
// Rate limiter for routes in the /api/ uir space
rateLimit: {
enabled: true,
limitInMins: 15, // The amount of mins for the rate limiter
max: 100, // The Max amount of requests
delayMs: 0, // The delay in ms (0 to indicate no delay until max)
headers: true, // Inject HTTP headers to show usage remaining
},
// Enable Simple Authentication
simpleAuth: {
enabled: false,
realm: '',
username: 'irony',
password: 'irony',
},
jwt: {
secret: 'helloworld',
},
},
// Feature Configuration
features: {
watchYoutube: {
enabled: true,
},
voiceRegulars: {
// Auto voice anyone who comes into the channel, or at a specified time interval
autoVoice: true,
autoVoiceTimeInMins: 40,
autoVoiceChannelIgnore: [],
// Message threshold: used in both auto voice and manual voiceRegulars
threshold: 250,
},
sed: {
totalDbResults: 50,
triggerStart: 's',
delimiter: '/',
ignoredChannels: ['#mrnodebot3'],
},
popularity: {
delayInMins: 30,
cleanJobInMins: 30,
ignoredChannels: [],
},
urls: {
userAgent: 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
maxLength: 10485760,
loggingIgnore: [],
announceIgnore: [],
unverifiedIgnore: [],
defaultTitleAnnounceMax: 255,
chainingLimit: {
'#mrnodebot3': 2,
},
repostLimit: {
'#mrnodebot3': 2,
},
titleMin: 35,
titleAnnounceMax: 255,
cacheCleanup: {
minute: 0,
},
// Amount of characters to limit title to, 0 or nothing for no limit
titleMaxLimit: {
'#mrnodebot3': 255,
},
},
idleChat: {
enabled: true,
timeOutInMins: 180,
channels: ['#fsociety', '#mrnodebot2'],
},
fsociety: {
mainChannel: '#mrnodebot2',
totalChannels: 0,
report: false,
delay: 5, // In seconds,
additionalChannels: [
'#MrNodeBot3',
],
greetIgnore: ['#mrnodebot2'],
greeterDealy: 20,
},
twitter: {
enabled: true,
followers: 'mrnodebot',
channels: ['#mrnodebot2'],
},
conversational: {
randomChance: 5000,
enabled: false,
ignoredChans: [],
},
exchangeRate: {
base: 'USD',
updateScheduleTime: {
hour: [...new Array(24).keys()], // Every hour
minute: 0, // On the hour
},
},
// New RSS Feeds Configuration
rssFeeds: {
},
// New Countdown Configuration
countdowns: [
{
who: 'Westworld Season 2',
when: new Date(2018, 2, 4, 21, 0, 0, 0), // MomentJS
what: [
'is welcoming new and repeat guests (you know how you are) in',
'is opening one-way rail service to a screen near you in',
'is arriving to a train station near you in',
'will be confirming your adventure of a lifetime reservations in',
'returns in',
'has reprogrammed its hosts to receive you in',
],
where: 'HBO',
why: {
twitter: {
hashtags: ['mrrobot', 'fsociety'],
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: 21,
minute: 11,
second: 0,
},
],
},
irc: {
'#mrnodebot2': {
priority: 1,
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: 21,
minute: 50,
second: 0,
},
],
},
'##westworld': {
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: 21,
minute: 50,
second: 0,
},
],
},
},
},
},
{
who: 'Mr Robot Season 3',
when: new Date(2018, 1, 22, 59, 0, 0, 0), // MomentJS
what: [
'is happening in',
'is coming to a screen near you in',
'is hacking all the things in',
'will be brought to you in',
'drops in',
'is hacking your democracy in',
],
where: 'USA Network',
why: {
irc: {
'#mrnodebot2': {
priority: 2,
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: null,
minute: null,
second: 1,
},
],
},
'#mrnodebot3': {
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: 21,
minute: 50,
second: 0,
},
],
},
},
},
},
],
},
};