Lint
This commit is contained in:
parent
f9e076fe91
commit
9e48e9b6ea
6 changed files with 17 additions and 17 deletions
|
@ -222,9 +222,9 @@ const aboutServer = function (c) {
|
|||
|
||||
const displayServerList = function (c) {
|
||||
index.bots.forEach((item, i) => {
|
||||
if(c.bot.id == i && c.bot.host.options.hideLocally){
|
||||
if (c.bot.id === i && c.bot.host.options.hideLocally) {
|
||||
c.reply({
|
||||
translate: getMessage(c.lang, "command.about.serverList.hideLocally"),
|
||||
translate: getMessage(c.lang, 'command.about.serverList.hideLocally'),
|
||||
color: c.colors.secondary,
|
||||
with: [
|
||||
{
|
||||
|
@ -232,8 +232,8 @@ const displayServerList = function (c) {
|
|||
color: c.colors.primary
|
||||
}
|
||||
]
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
}
|
||||
if (item.host.options && item.host.options.hidden && c.verify !== 2 && c.bot.id !== i) return
|
||||
let message = 'command.about.serverListItem'
|
||||
|
|
|
@ -3,7 +3,7 @@ const { getMessage } = require('../util/lang.js')
|
|||
module.exports = {
|
||||
execute: (c) => {
|
||||
const item = eval(c.args.join(' '))
|
||||
if(c.type == "console"){
|
||||
if (c.type === 'console') {
|
||||
console.log(item)
|
||||
} else {
|
||||
c.reply({
|
||||
|
|
|
@ -3,9 +3,9 @@ const version = require('../version.json')
|
|||
module.exports = {
|
||||
execute: (c) => {
|
||||
if (c.verify < 1) {
|
||||
c.bot.tellraw("@a",{
|
||||
translate: "%s %s: %s",
|
||||
color: "white",
|
||||
c.bot.tellraw('@a', {
|
||||
translate: '%s %s: %s',
|
||||
color: 'white',
|
||||
with: [
|
||||
{
|
||||
translate: '[%s]',
|
||||
|
|
8
index.js
8
index.js
|
@ -18,7 +18,7 @@ const settings = require('./settings.json')
|
|||
const secret = require('./secret.json')
|
||||
const version = require('./version.json')
|
||||
const protover = require('./util/getProtocolVersion.js')
|
||||
const mcd = require("minecraft-data")
|
||||
const mcd = require('minecraft-data')
|
||||
module.exports.bots = []
|
||||
|
||||
const botplug = []
|
||||
|
@ -42,7 +42,7 @@ const loadplug = (botno) => {
|
|||
})
|
||||
}
|
||||
|
||||
let bypassWarningShown = false;
|
||||
let bypassWarningShown = false
|
||||
|
||||
const createBot = function createBot (host, oldId) {
|
||||
if (host.options.disabled) {
|
||||
|
@ -58,8 +58,8 @@ const createBot = function createBot (host, oldId) {
|
|||
console.error(`[error] ${version.botName} does not support Minecraft versions below ${version.minimumMcVersion} (${mcd.postNettyVersionsByProtocolVersion.pc[version.minimumMcVersion][0].minecraftVersion})`)
|
||||
return
|
||||
} else {
|
||||
if(!bypassWarningShown) console.warn(`[warning] You have disabled the version requirement, allowing the bot to join to servers with old Minecraft versions. These versions are unsupported and may break at any time. Any issues on such versions will not be fixed.`)
|
||||
bypassWarningShown = true;
|
||||
if (!bypassWarningShown) console.warn('[warning] You have disabled the version requirement, allowing the bot to join to servers with old Minecraft versions. These versions are unsupported and may break at any time. Any issues on such versions will not be fixed.')
|
||||
bypassWarningShown = true
|
||||
}
|
||||
}
|
||||
if (host.options.online) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const fs = require('fs')
|
||||
const languages = {}
|
||||
const settings = require('../settings.json')
|
||||
const fallbackLocale = settings.fallbackLocale ? settings.fallbackLocale : "en-US";
|
||||
const fallbackLocale = settings.fallbackLocale ? settings.fallbackLocale : 'en-US'
|
||||
|
||||
const loadplug = (botno) => {
|
||||
const bpl = fs.readdirSync('lang')
|
||||
|
|
Loading…
Reference in a new issue