add logging as server option

This commit is contained in:
ChomeNS 2022-12-03 19:53:47 +07:00
parent 0fdc93574a
commit 56060626e2
3 changed files with 12 additions and 5 deletions

1
bot.js
View file

@ -36,6 +36,7 @@ async function createBot (server, config, getBots, setNewBot, dcclient, rl) {
port: server.port,
version: config.version,
kaboom: server.kaboom,
logging: server.logging,
checkTimeoutInterval: '30000',
keepAlive: false,
hideErrors: true

View file

@ -63,27 +63,32 @@ module.exports = {
{
host: 'play.kaboom.pw',
port: 25565,
kaboom: true
kaboom: true,
logging: false
},
{
host: 'sus.shhnowisnottheti.me',
port: 25565,
kaboom: true
kaboom: true,
logging: true
},
{
host: 'kitsune.icu',
port: 25565,
kaboom: true
kaboom: true,
logging: true
},
{
host: 'real.chipmunk.land',
port: 25565,
kaboom: true
kaboom: true,
logging: true
}// ,
// {
// host: 'mc.chomens41793.ga',
// port: 25565,
// kaboom: true
// kaboom: true,
// logging: true
// }
]
}

View file

@ -33,6 +33,7 @@ function inject (bot, _dcclient, config, rl) {
}
bot.on('parsed_chat', (message) => {
if (!bot.options.logging) return
bot.console.log(message.toAnsi())
})