mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-27 09:35:35 -05:00
fix ansi color console thingy
i saw hbot doing "/username HBot" so i noticed it and fixed this ploblem
This commit is contained in:
parent
738d5472e0
commit
08a42ddd69
3 changed files with 3 additions and 4 deletions
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
usage: [
|
||||
'<run> <code>',
|
||||
'<reset>',
|
||||
'<server (eval server)> code',
|
||||
'<server (eval server)> <code>',
|
||||
],
|
||||
execute: function(bot, username, usernameraw, sender, prefix, args, config) {
|
||||
if (args[0] === 'run') {
|
||||
|
|
|
@ -9,9 +9,9 @@ function inject(bot, dcclient, config, rl) {
|
|||
const chatMessage = require('prismarine-chat')(bot.version);
|
||||
|
||||
function prefix(prefix, _message) {
|
||||
const message = `[${moment().format('HH:mm:ss')} ${prefix}§r] [${bot.options.host}] ${_message}`;
|
||||
const message = `[${moment().format('HH:mm:ss')} ${prefix}§r] [${bot.options.host}] `;
|
||||
const component = chatMessage.MessageBuilder.fromString(message).toJSON();
|
||||
return chatMessage.fromNotch(component).toAnsi();
|
||||
return chatMessage.fromNotch(component).toAnsi() + _message;
|
||||
}
|
||||
|
||||
bot.console = {};
|
||||
|
|
1
run.js
1
run.js
|
@ -1,5 +1,4 @@
|
|||
/* eslint-disable max-len */
|
||||
/* eslint-disable no-var */
|
||||
const readline = require('node:readline');
|
||||
const {stdin: input, stdout: output} = require('node:process');
|
||||
const rl = readline.createInterface({input, output});
|
||||
|
|
Loading…
Reference in a new issue