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