owobot/util/ConsoleCommand.js

31 lines
899 B
JavaScript
Raw Normal View History

2024-07-27 02:39:18 -04:00
const index = require('../index.js')
2024-08-12 05:13:32 -04:00
const parse = require('../util/chatparse_console.js')
const settings = require('../settings.json')
2024-09-12 00:18:41 -04:00
const version = require('../version.json')
class ConsoleCommand {
constructor (cmd, index2) {
this.send = () => {}
2024-08-12 05:13:32 -04:00
this.reply = text => process.stdout.write(parse(text) + '\n')
this.uuid = 'dde5a2a6-ebdd-7bbb-8eac-f75b10c10446'
this.username = 'Owner'
this.nickname = 'Owner'
this.command = cmd
this.msgType = '_bot_console'
this.prefix = ''
this.bot = index2 >= 0
? index.bot[index2]
2024-08-12 05:13:32 -04:00
: {}
this.type = 'console'
this.args = cmd.split(' ').slice(1)
2024-08-23 10:29:01 -04:00
this.cmdName = cmd.split(' ')[0]
this.verify = 3
this.host = ''
this.port = '3'
this.serverName = `${version.botName} Console`
this.lang = settings.defaultLang
this.colors = settings.colors
}
2024-07-27 02:39:18 -04:00
}
module.exports = ConsoleCommand