This commit is contained in:
7cc5c4f330d47060 2024-08-25 22:26:03 -04:00
parent 831ed85c00
commit 314cfc9f85
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA
10 changed files with 30 additions and 30 deletions

View file

@ -112,7 +112,7 @@ const aboutServer = function (c) {
text: thisItem,
color: c.colors.primary,
clickEvent: {
action: "copy_to_clipboard",
action: 'copy_to_clipboard',
value: thisItem
},
hoverEvent: {
@ -203,7 +203,7 @@ const aboutServer = function (c) {
const displayServerList = function (c) {
index.bot.forEach((item, i) => {
if (item.host.options && item.host.options.hidden && c.verify !== 3 && c.bot.id !== i) return
let message = 'command.about.serverListItem';
let message = 'command.about.serverListItem'
if (c.bot.id == i) message = 'command.about.serverListItem.thisServer'
c.reply({
translate: getMessage(c.lang, message),
@ -217,7 +217,7 @@ const displayServerList = function (c) {
text: `${item.host.host}:${item.host.port}`,
color: c.colors.primary,
clickEvent: {
action: "copy_to_clipboard",
action: 'copy_to_clipboard',
value: `${item.host.host}:${item.host.port}`
},
hoverEvent: {
@ -240,9 +240,9 @@ const displayServerList = function (c) {
module.exports = {
execute: function (c) {
let subcmd = c.args[0]
if(subcmd === "servers") subcmd = "serverlist"
if(c.cmdName === "serverinfo") subcmd = "server"
if(c.cmdName === "serverlist" || c.cmdName === "servers") subcmd = "serverlist"
if (subcmd === 'servers') subcmd = 'serverlist'
if (c.cmdName === 'serverinfo') subcmd = 'server'
if (c.cmdName === 'serverlist' || c.cmdName === 'servers') subcmd = 'serverlist'
if (subcmd === 'server') {
aboutServer(c)
} else if (subcmd === 'serverlist') {

View file

@ -5,8 +5,8 @@ module.exports = {
let host = c.host
let port = c.port
if (c.bot.host.options && c.bot.host.options.hidden) {
host = "localhost" // Makes hidden servers appear as localhost
port = "25565"
host = 'localhost' // Makes hidden servers appear as localhost
port = '25565'
}
const json = {
translate: '[%s] %s: %s',
@ -14,12 +14,12 @@ module.exports = {
{
text: c.serverName,
hoverEvent: {
action: "show_text",
action: 'show_text',
value: {
translate: '%s: %s:%s',
with: [
{
text: getMessage(c.lang, "command.netmsg.serverAddress"),
text: getMessage(c.lang, 'command.netmsg.serverAddress'),
color: c.colors.primary
},
{
@ -47,7 +47,7 @@ module.exports = {
color: 'white'
}
bot.forEach(item => {
if(item.host.options && item.host.options.netmsgIncomingDisabled && c.type !== "console") return
if (item.host.options && item.host.options.netmsgIncomingDisabled && c.type !== 'console') return
item.tellraw('@a', json)
})
}

View file

@ -2,7 +2,7 @@ const { languages, getMessage } = require('../util/lang.js')
const fs = require('fs')
module.exports = {
execute: (c) => {
if(c.type == "console"){
if (c.type == 'console') {
c.reply({
text: getMessage(c.lang, 'command.settings.disabled.console'),
color: c.colors.secondary

View file

@ -14,7 +14,7 @@ module.exports = {
text: item,
color: c.colors.primary,
clickEvent: {
action: "copy_to_clipboard",
action: 'copy_to_clipboard',
value: item
},
hoverEvent: {

View file

@ -1,14 +1,14 @@
const fs = require('fs')
if (!fs.readdirSync('.').includes('settings.json')) {
console.log("Settings file is missing, using defaults.")
fs.copyFileSync("settings_example.json", "settings.json")
console.log('Settings file is missing, using defaults.')
fs.copyFileSync('settings_example.json', 'settings.json')
}
if (!fs.readdirSync('.').includes('secret.json')) {
console.log("Secrets file is missing, using defaults.")
fs.copyFileSync("secret_example.json", "secret.json")
console.log("Please change the hashing keys in the secrets file.")
console.log('Secrets file is missing, using defaults.')
fs.copyFileSync('secret_example.json', 'secret.json')
console.log('Please change the hashing keys in the secrets file.')
}
const m = require('minecraft-protocol')

View file

@ -18,7 +18,7 @@ module.exports = {
load: (b) => {
b.prefix = settings.prefix
b.lastCmd = 0
b.on("chat",(data)=>{
b.on('chat', (data) => {
const fullCommand = data.message
for (const prefix of b.prefix) {
if (fullCommand.startsWith(prefix)) {

View file

@ -33,11 +33,11 @@ const rsg = function (count) {
const rsgLegal = function (count) {
let output = ''
if (Math.random() > 0.5) {
output += "uwu_"
output += 'uwu_'
} else {
output += "owo_"
output += 'owo_'
}
output += crypto.randomBytes(count).toString("hex")
output += crypto.randomBytes(count).toString('hex')
return output
}
module.exports = function (legal) {