This commit is contained in:
7cc5c4f330d47060 2024-10-23 23:07:37 -04:00
parent 382e6ce045
commit a97d51b763
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
14 changed files with 24 additions and 24 deletions

View file

@ -1,4 +1,4 @@
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
const priority = 0
const parse = (data, b) => {

View file

@ -1,4 +1,4 @@
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
const priority = 0
const parse = (data, b) => {

View file

@ -1,4 +1,4 @@
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
const priority = 1
const parse = (data, b) => {

View file

@ -1,4 +1,4 @@
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
const priority = 2
const parse = (data, b) => {

View file

@ -1,4 +1,4 @@
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
const priority = 1
const parse = (data, b) => {

View file

@ -1,6 +1,6 @@
import { uuidToInt } from '../util/uuidtoint.js'
import { parse2 as plainParser } from '../util/chatparse_plain.js'
import { parse2 as mcParser } from '../util/chatparse_mc.js'
import { default as uuidToInt } from '../util/uuidtoint.js'
import { default as plainParser } from '../util/chatparse_plain.js'
import { default as mcParser } from '../util/chatparse_mc.js'
const cs = {
x: 4,
y: 6,

View file

@ -1,5 +1,5 @@
import { parse2 as parse } from '../util/chatparse_plain.js'
import { parse as parseNBT } from '../util/parseNBT.js'
import { default as parse } from '../util/chatparse_plain.js'
import { default as parseNBT } from '../util/parseNBT.js'
export default function load (b) {
b.players = {}

View file

@ -1,5 +1,5 @@
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { parse2 as parseMc } from '../util/chatparse_mc_withHex.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
import { default as parseMc } from '../util/chatparse_mc_withHex.js'
import { default as settings } from '../settings.json' with {type: "json"}
import { default as version } from '../version.json' with {type: "json"}
class SCTask {

View file

@ -1,7 +1,7 @@
import { default as settings } from '../settings.json' with {type: "json"}
import { parse2 as parsePlain } from '../util/chatparse_plain.js'
import { parse2 as parseConsole } from '../util/chatparse_console.js'
import { parse as parse1204 } from '../util/parseNBT.js'
import { default as parsePlain } from '../util/chatparse_plain.js'
import { default as parseConsole } from '../util/chatparse_console.js'
import { default as parse1204 } from '../util/parseNBT.js'
import { getMessage } from '../util/lang.js'
import { readdirSync } from "node:fs"
const convertChatStyleItem = (item) => {
@ -45,7 +45,7 @@ for (const plugin of bpl) {
}
export default function load (b) {
export default function defaultad (b) {
b.messageCount = 0
b.chatDisabledUntil = 0
b.interval.antiSpam = setInterval(() => {

View file

@ -1,5 +1,5 @@
import { default as settings } from '../settings.json' with {type: "json"}
import { lang } from './mc_lang.js'
import lang from './mc_lang.js'
import { default as _consoleColors } from './consolecolors.json' with {type: "json"}
let consoleColors

View file

@ -1,4 +1,4 @@
import { lang } from './mc_lang.js'
import lang from './mc_lang.js'
const consoleColors = {
dark_red: '§4',

View file

@ -1,4 +1,4 @@
import { lang } from './mc_lang.js'
import lang from './mc_lang.js'
const consoleColors = {
dark_red: '§4',

View file

@ -1,4 +1,4 @@
import { lang } from './mc_lang.js'
import lang from './mc_lang.js'
const parse = function (_data, l = 0) {
if (l >= 4) {
return ''

View file

@ -1,20 +1,20 @@
//const fs = require('fs')
import { readdirSync } from "node:fs"
const languages = {}
import { default as settings } from '../settings.json' with {type: "json"}
const fallbackLocale = settings.fallbackLocale ? settings.fallbackLocale : 'en-US'
const loadplug = (botno) => {
const bpl = fs.readdirSync('lang')
const bpl = readdirSync('lang')
for (const plugin of bpl) {
if (!plugin.endsWith('.json')) {
continue
}
try {
languages[plugin.split('.')[0]] = require(`../lang/${plugin}`)
languages[plugin.split('.')[0]] = import(`../lang/${plugin}`, {with: {type: "json"}})
} catch (e) { console.log(e) }
}
}
//loadplug()
loadplug()
const getMessage = function (l, msg, with2) {
let message = msg.replace(/%%/g, '\ue123')