config.console fix

This commit is contained in:
ChomeNS 2022-11-29 20:01:37 +07:00
parent 84ad91a574
commit 48d54532a5

View file

@ -5,8 +5,6 @@ const moment = require('moment-timezone')
const util = require('util')
function inject (bot, _dcclient, config, rl) {
if (!config.console) return
// readline > fix on log
function log (...args) {
rl.output.write('\x1b[2K\r')
@ -38,6 +36,8 @@ function inject (bot, _dcclient, config, rl) {
bot.console.log(message.toAnsi())
})
if (!config.console) return
function handleLine (line) {
try {
if (line.toLowerCase() === '' ||