2024-08-20 06:39:00 -04:00
|
|
|
import { bot } from '../index.mjs'
|
|
|
|
import { default as parse } from './chatparse_console.mjs'
|
2024-08-20 06:04:23 -04:00
|
|
|
import { default as settings } from '../settings.json' with {type: "json"}
|
2024-08-12 04:33:43 -04:00
|
|
|
class ConsoleCommand {
|
|
|
|
constructor (cmd, index2) {
|
2024-08-18 03:17:47 -04:00
|
|
|
this.send = () => {}
|
2024-08-12 04:33:43 -04:00
|
|
|
this.reply = text => process.stdout.write(parse(text) + '\n')
|
2024-08-18 03:17:47 -04:00
|
|
|
this.uuid = 'dde5a2a6-ebdd-7bbb-8eac-f75b10c10446'
|
2024-08-12 04:33:43 -04:00
|
|
|
this.username = 'Owner'
|
|
|
|
this.nickname = 'Console'
|
|
|
|
this.command = cmd
|
2024-08-18 03:18:09 -04:00
|
|
|
this.msgType = '_bot_console'
|
2024-08-18 03:17:47 -04:00
|
|
|
this.prefix = ''
|
2024-08-12 04:33:43 -04:00
|
|
|
this.bot = index2 >= 0
|
2024-08-20 06:04:23 -04:00
|
|
|
? bot[index2]
|
2024-08-12 04:33:43 -04:00
|
|
|
: {}
|
|
|
|
this.type = 'console'
|
|
|
|
this.args = cmd.split(' ').slice(1)
|
|
|
|
this.verify = 3
|
|
|
|
this.host = ''
|
2024-08-18 03:17:47 -04:00
|
|
|
this.port = '3'
|
2024-08-12 04:33:43 -04:00
|
|
|
this.lang = settings.defaultLang
|
|
|
|
this.colors = settings.colors
|
|
|
|
}
|
|
|
|
}
|
2024-08-20 06:04:23 -04:00
|
|
|
export default ConsoleCommand
|