self care config

This commit is contained in:
ChomeNS 2022-11-06 17:52:40 +07:00
parent 81d5bc1189
commit a655752a50
2 changed files with 14 additions and 6 deletions

View file

@ -16,6 +16,14 @@ module.exports = {
'layers': 3,
'refillInterval': 1000 * 60,
},
'self_care': {
'prefix': true,
'op': true,
'cspy': true,
'vanish': true,
'gamemode': true,
'mute': true,
},
'eval': {
'serverUrl': 'http://192.168.1.105:4445/',
},

View file

@ -55,13 +55,13 @@ function inject(bot, dcclient, config) {
const interval = setInterval(() => {
if (bot.options.host!=='0.tcp.ap.ngrok.io') {
if (!prefix) bot.chat('/extras:prefix &8[&eChomeNS Bot&8]');
if (!op) bot.chat('/minecraft:op @s[type=player]');
if (!cspy) bot.chat('/commandspy:commandspy on');
if (!prefix && config.self_care.prefix) bot.chat('/extras:prefix &8[&eChomeNS Bot&8]');
if (!op && config.self_care.op) bot.chat('/minecraft:op @s[type=player]');
if (!cspy && config.self_care.cspy) bot.chat('/commandspy:commandspy on');
}
if (!vanish) bot.chat('/essentials:vanish enable');
if (gameMode !== 1) bot.chat('/minecraft:gamemode creative @s[type=player]');
if (muted) bot.chat('/essentials:mute ' + bot.uuid);
if (!vanish && config.self_care.vanish) bot.chat('/essentials:vanish enable');
if (gameMode !== 1 && config.self_care.gamemode) bot.chat('/minecraft:gamemode creative @s[type=player]');
if (muted && config.self_care.mute) bot.chat('/essentials:mute ' + bot.uuid);
}, config.self_care_check_interval);
bot.once('end', () => {