make bracket colour setting universal

This commit is contained in:
hgw 2023-10-02 02:11:25 +00:00
parent 4992ba5a28
commit 2da61e392d
5 changed files with 14 additions and 11 deletions

5
bot.js
View File

@ -5,8 +5,9 @@ var readline = require('readline');
const { Worker } = require('worker_threads');
//var randomWords = require('better-random-words');
warningMsg = '['+config.colours.warning+'WARNING]'
errorMsg = '['+config.colours.error+'ERROR]'
warningMsg = ''+config.colours.brackets+'['+config.colours.warning+'WARNING'+config.colours.brackets+']'
errorMsg = ''+config.colours.brackets+'['+config.colours.error+'ERROR'+config.colours.brackets+']'
var bot = new irc.Client(config.irc.server, config.irc.nickname, {
channels: config.irc.channels,

View File

@ -10,8 +10,8 @@ const moment = require('moment');
const tz = require('moment-timezone');
const timer = ms => new Promise(res => setTimeout(res, ms))
warningMsg = '['+config.colours.warning+'WARNING]'
errorMsg = '['+config.colours.error+'ERROR]'
warningMsg = ''+config.colours.brackets+'['+config.colours.warning+'WARNING'+config.colours.brackets+']'
errorMsg = ''+config.colours.brackets+'['+config.colours.error+'ERROR'+config.colours.brackets+']'
async function sendUpstream(content) {
var output = content.join("\n")
@ -75,7 +75,7 @@ async function fetchFeed(feedURL, n) {
var body = truncatedString + "..."
}
date = ''+config.colours.date_brackets+'['+config.colours.date+date+''+config.colours.date_brackets+'] '
date = ''+config.colours.brackets+'['+config.colours.date+date+''+config.colours.brackets+'] '
title = ''+config.colours.title+title+' '
author = ''+config.colours.author+data.creator+' '
body = ''+config.colours.body+body+' '

View File

@ -12,8 +12,9 @@ const tz = require('moment-timezone');
const editJsonFile = require("edit-json-file");
const timer = ms => new Promise(res => setTimeout(res, ms))
warningMsg = '['+config.colours.warning+'WARNING]'
errorMsg = '['+config.colours.error+'ERROR]'
warningMsg = ''+config.colours.brackets+'['+config.colours.warning+'WARNING'+config.colours.brackets+']'
errorMsg = ''+config.colours.brackets+'['+config.colours.error+'ERROR'+config.colours.brackets+']'
async function sendUpstream(content) {
//var output = content.join("\n")

View File

@ -10,8 +10,9 @@ const moment = require('moment');
const tz = require('moment-timezone');
const timer = ms => new Promise(res => setTimeout(res, ms))
warningMsg = '['+config.colours.warning+'WARNING]'
errorMsg = '['+config.colours.error+'ERROR]'
warningMsg = ''+config.colours.brackets+'['+config.colours.warning+'WARNING'+config.colours.brackets+']'
errorMsg = ''+config.colours.brackets+'['+config.colours.error+'ERROR'+config.colours.brackets+']'
async function sendUpstream(content) {
var output = content.join("\n")
@ -87,7 +88,7 @@ async function fetchFeed(feedURL, n) {
var body = truncatedString + "..."
}
date = ''+config.colours.date_brackets+'['+config.colours.date+date+''+config.colours.date_brackets+'] '
date = ''+config.colours.brackets+'['+config.colours.date+date+''+config.colours.brackets+'] '
title = ''+config.colours.title+title+' '
author = ''+config.colours.author+data.creator+' '
body = ''+config.colours.body+body+' '

View File

@ -16,7 +16,7 @@
},
"colours": {
"date": "11",
"date_brackets": "15",
"brackets": "15",
"title": "08",
"author": "08",
"body": "00",