v6.0.8 build: 1090
added private option to the config for netmsg for right now added icu selfcare made vanish selfcare toggleable
This commit is contained in:
parent
0aed4d7d7a
commit
3344fc6e2e
8 changed files with 96 additions and 30 deletions
|
@ -80,7 +80,7 @@ module.exports = {
|
||||||
case "trusted":
|
case "trusted":
|
||||||
case "t":
|
case "t":
|
||||||
if (bot.console.customChat.enabled) {
|
if (bot.console.customChat.enabled) {
|
||||||
bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.owner} ${args.slice(3).join(' ')}`);
|
bot.console.customChat.chat(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.trusted} ${args.slice(3).join(' ')}`);
|
||||||
} else if (!bot.console.customChat.enabled) {
|
} else if (!bot.console.customChat.enabled) {
|
||||||
bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.trusted} ${args.slice(3).join(' ')}`);
|
bot.chat.message(`${config.prefixes[0]}${args.slice(2).shift()} ${bot.validation.trusted} ${args.slice(3).join(' ')}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,28 +409,28 @@ module.exports = {
|
||||||
bot.discord.message.reply({ embeds: [Embed] })
|
bot.discord.message.reply({ embeds: [Embed] })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (command?.trustLevel === 0) {
|
if (command?.trustLevel === 0 && command.discordExecute) {
|
||||||
public.push([
|
public.push([
|
||||||
{
|
{
|
||||||
text: command.name + ' ',
|
text: command.name + ' ',
|
||||||
color: "aqua",
|
color: "aqua",
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (command?.trustLevel === 1) {
|
} else if (command?.trustLevel === 1 && command.discordExecute) {
|
||||||
trusted.push([
|
trusted.push([
|
||||||
{
|
{
|
||||||
text: command.name + ' ',
|
text: command.name + ' ',
|
||||||
color: "dark_aqua"
|
color: "dark_aqua"
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (command?.trustLevel === 2) {
|
} else if (command?.trustLevel === 2 && command.discordExecute) {
|
||||||
admin.push([
|
admin.push([
|
||||||
{
|
{
|
||||||
text: command.name + ' ',
|
text: command.name + ' ',
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (command?.trustLevel === 3) {
|
} else if (command?.trustLevel === 3 && command.discordExecute) {
|
||||||
owner.push([
|
owner.push([
|
||||||
{
|
{
|
||||||
text: command.name + ' ',
|
text: command.name + ' ',
|
||||||
|
@ -439,7 +439,7 @@ module.exports = {
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const length = bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
|
const length = bot.commandManager.commandlist.filter(c => c.trustLevel !== 3 && c.discordExecute).length
|
||||||
const ansi1 = bot.getMessageAsPrismarine([ { text: 'Commands (', color: 'gray' }, { text: JSON.stringify(length), color: 'gold' }, { text: ') ', color: 'gray' }, category, '\n', public, trusted, owner ])?.toAnsi();
|
const ansi1 = bot.getMessageAsPrismarine([ { text: 'Commands (', color: 'gray' }, { text: JSON.stringify(length), color: 'gold' }, { text: ') ', color: 'gray' }, category, '\n', public, trusted, owner ])?.toAnsi();
|
||||||
const fix1 = fixansi(ansi1.replaceAll('`', '`\u200b'))
|
const fix1 = fixansi(ansi1.replaceAll('`', '`\u200b'))
|
||||||
const Embed = new EmbedBuilder()
|
const Embed = new EmbedBuilder()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const CommandError = require('../util/command_error.js')
|
const CommandError = require('../util/command_error.js')
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'netmsg',
|
name: 'netmsg',
|
||||||
trustLevel: 1,
|
trustLevel: 0,
|
||||||
aliases: [
|
aliases: [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -14,23 +14,25 @@ module.exports = {
|
||||||
const bot = context.bot;
|
const bot = context.bot;
|
||||||
const source = context.source;
|
const source = context.source;
|
||||||
const config = context.config;
|
const config = context.config;
|
||||||
if (config.patches.netmsg) {
|
if (bot.options.private) {
|
||||||
component = [
|
|
||||||
{ text: '[', color: "dark_gray" },
|
|
||||||
{ text: bot.options.serverName, color: "gray" },
|
|
||||||
{ text: "] ", color: "dark_gray" },
|
|
||||||
source.player.displayName,
|
|
||||||
{ text: " \u203a ", color: "dark_gray", bold: false },
|
|
||||||
{ text: args.join(' '), color: "gray", bold: false }
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
component = {
|
component = {
|
||||||
translate: '[%s] %s \u203a %s',
|
translate: '[%s] %s \u203a %s',
|
||||||
color: "dark_gray",
|
color: "dark_gray",
|
||||||
with: [
|
with: [
|
||||||
{ text: bot.options.serverName, color: "gray" },
|
{ text: bot.options.serverName, color: "blue" },
|
||||||
source.player.displayName ?? source.player.profile.name,
|
source.player.displayName ?? source.player.profile.name,
|
||||||
{ text: args.join(' '), color: "gray" },
|
{ text: args.join(' '), color: "blue" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} else if (!bot.options.private) {
|
||||||
|
component = {
|
||||||
|
translate: '[%s:%s] %s \u203a %s',
|
||||||
|
color: "dark_gray",
|
||||||
|
with: [
|
||||||
|
{ text: bot.options.host, color: "blue" },
|
||||||
|
{ text: `${bot.options.port}`, color: "gold" },
|
||||||
|
source.player.displayName ?? source.player.profile.name,
|
||||||
|
{ text: args.join(' '), color: "blue" },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,13 +55,27 @@ module.exports = {
|
||||||
const bot = context.bot;
|
const bot = context.bot;
|
||||||
const args = context.arguments;
|
const args = context.arguments;
|
||||||
const source = context.source;
|
const source = context.source;
|
||||||
const component = {
|
if (bot.options.private) {
|
||||||
translate: '[%s] %s \u203a %s',
|
component = {
|
||||||
with: [
|
translate: '[%s] %s \u203a %s',
|
||||||
bot.options.serverName,
|
color: "dark_gray",
|
||||||
source.player.displayName ?? source.player.profile.name,
|
with: [
|
||||||
args.join(' ')
|
{ text: bot.options.serverName, color: "blue" },
|
||||||
]
|
source.player.displayName ?? source.player.profile.name,
|
||||||
|
{ text: args.join(' '), color: "blue" },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
} else if (!bot.options.private) {
|
||||||
|
component = {
|
||||||
|
translate: '[%s:%s] %s \u203a %s',
|
||||||
|
color: "dark_gray",
|
||||||
|
with: [
|
||||||
|
{ text: bot.options.host, color: "blue" },
|
||||||
|
{ text: `${bot.options.port}`, color: "gold" },
|
||||||
|
source.player.displayName ?? source.player.profile.name,
|
||||||
|
{ text: args.join(' '), color: "blue" },
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bot.bots.filter((eachBot) => {
|
bot.bots.filter((eachBot) => {
|
||||||
if (eachBot.options.serverName === "Savage Friends" && eachBot.options.isSavage && !eachBot.options.useChat && !eachBot.options.isKaboom) {
|
if (eachBot.options.serverName === "Savage Friends" && eachBot.options.isSavage && !eachBot.options.useChat && !eachBot.options.isKaboom) {
|
||||||
|
|
31
src/commands/vanish.js
Normal file
31
src/commands/vanish.js
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
module.exports = {
|
||||||
|
name: 'vanish',
|
||||||
|
trustLevel: 2,
|
||||||
|
aliases: [
|
||||||
|
"vanishtoggle"
|
||||||
|
],
|
||||||
|
description: 'toggle the bots vanish selfcare',
|
||||||
|
usages: [
|
||||||
|
|
||||||
|
],
|
||||||
|
execute (context) {
|
||||||
|
const bot = context.bot
|
||||||
|
const args = context.arguments;
|
||||||
|
if (args.slice(1).join('') === 'true') {
|
||||||
|
bot.vanished = true
|
||||||
|
bot.chat.message('enabled vanish selfcare')
|
||||||
|
}
|
||||||
|
if (args.slice(1).join('') === 'false') {
|
||||||
|
bot.vanished = false;
|
||||||
|
bot.chat.message('disabled vanish selfcare')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
discordExecute (context) {
|
||||||
|
const bot = context.bot;
|
||||||
|
const args = context.arguments;
|
||||||
|
bot.vanished = false;
|
||||||
|
bot.chat.message('disabling vanish selfcare,...');
|
||||||
|
bot.chat.command('v off')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -51,6 +51,7 @@ bots:
|
||||||
usernameGen: true
|
usernameGen: true
|
||||||
version: "1.20.2"
|
version: "1.20.2"
|
||||||
serverName: "localhost"
|
serverName: "localhost"
|
||||||
|
private: false
|
||||||
reconnectDelay: 6000
|
reconnectDelay: 6000
|
||||||
channelId: "discord channel id here"
|
channelId: "discord channel id here"
|
||||||
logging: false
|
logging: false
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"bot": {
|
"bot": {
|
||||||
"buildstring": {
|
"buildstring": {
|
||||||
"version": "v6.0.7",
|
"version": "v6.0.8",
|
||||||
"build":"1080",
|
"build":"1090",
|
||||||
"codename":""
|
"codename":""
|
||||||
},
|
},
|
||||||
"source": "https://code.chipmunk.land/Parker2991/FridayNightFunkinBoyfriendBot/"
|
"source": "https://code.chipmunk.land/Parker2991/FridayNightFunkinBoyfriendBot/"
|
||||||
|
|
|
@ -19,7 +19,7 @@ function Console (bot, options, config) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
source: new CommandSource(bot.options.username, { console: true, discord: false }),
|
source: new CommandSource(bot._client.username, { console: true, discord: false }),
|
||||||
refreshLine (...args) {
|
refreshLine (...args) {
|
||||||
this.readline.output.write("\x1b[2K\r");
|
this.readline.output.write("\x1b[2K\r");
|
||||||
console.log.apply(console, arguments);
|
console.log.apply(console, arguments);
|
||||||
|
|
|
@ -12,6 +12,8 @@ function selfcare (bot, options, config) {
|
||||||
let nickname = false;
|
let nickname = false;
|
||||||
let login = false;
|
let login = false;
|
||||||
let register = false;
|
let register = false;
|
||||||
|
let positionCount = 0;
|
||||||
|
bot.vanished = true
|
||||||
// You now have the tag: &8[&bPrefix&8: &3~&8]
|
// You now have the tag: &8[&bPrefix&8: &3~&8]
|
||||||
// You no longer have a tag
|
// You no longer have a tag
|
||||||
bot.on('message', (message) => {
|
bot.on('message', (message) => {
|
||||||
|
@ -63,18 +65,34 @@ You already have registered this username!
|
||||||
else if (stringMessage.startsWith('Your nickname is now ')) nickname = true;
|
else if (stringMessage.startsWith('Your nickname is now ')) nickname = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
bot.on('packet.entity_status', packet => {
|
bot.on('packet.entity_status', packet => {
|
||||||
if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return
|
if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return
|
||||||
permissionLevel = packet.entityStatus - 24
|
permissionLevel = packet.entityStatus - 24
|
||||||
})
|
})
|
||||||
|
|
||||||
bot.on('packet.game_state_change', packet => {
|
bot.on('packet.game_state_change', packet => {
|
||||||
if (packet.reason !== 3) return // Reason 3 = Change Game Mode
|
if (packet.reason !== 3) return // Reason 3 = Change Game Mode
|
||||||
gameMode = packet.gameMode;
|
gameMode = packet.gameMode;
|
||||||
});
|
});
|
||||||
|
|
||||||
bot.on("packet.game_state.change", packet => {
|
bot.on("packet.game_state.change", packet => {
|
||||||
if (packet.reason !== 4) return // checks if the bot is seeing the endcredits or died
|
if (packet.reason !== 4) return // checks if the bot is seeing the endcredits or died
|
||||||
clientLock = packet.gameMode;
|
clientLock = packet.gameMode;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
bot.on("packet.position", (packet, position) => {
|
||||||
|
positionCount++
|
||||||
|
setTimeout(() => {
|
||||||
|
positionCount--
|
||||||
|
if (positionCount > 4) {
|
||||||
|
bot.core.run('sudo * icu stop');
|
||||||
|
} if (permissionLevel < 2 || gameMode !== 1) {
|
||||||
|
bot._client.end('anti icu :3');
|
||||||
|
}
|
||||||
|
}, 1000)
|
||||||
|
})
|
||||||
|
|
||||||
let timer;
|
let timer;
|
||||||
bot.on('packet.login', (packet) => {
|
bot.on('packet.login', (packet) => {
|
||||||
entityId = packet.entityId;
|
entityId = packet.entityId;
|
||||||
|
@ -96,7 +114,7 @@ You already have registered this username!
|
||||||
else if (username) bot.chat.command(`username ${bot.options.username}`)
|
else if (username) bot.chat.command(`username ${bot.options.username}`)
|
||||||
else if (nickname) bot.chat.command(`nick off`)
|
else if (nickname) bot.chat.command(`nick off`)
|
||||||
else if (!prefix) bot.chat.command(`prefix &8[&bPrefix&8: &3${config.prefixes[0]}&8]`);
|
else if (!prefix) bot.chat.command(`prefix &8[&bPrefix&8: &3${config.prefixes[0]}&8]`);
|
||||||
else if (!vanished) bot.chat.command(`essentials:vanish on`);
|
else if (!vanished && bot.vanished) bot.chat.command(`essentials:vanish on`);
|
||||||
else if (unmuted) bot.core.run(`essentials:mute ${bot.uuid}`);
|
else if (unmuted) bot.core.run(`essentials:mute ${bot.uuid}`);
|
||||||
else if (!god) bot.core.run(`god ${bot.options.username} enable`);
|
else if (!god) bot.core.run(`god ${bot.options.username} enable`);
|
||||||
else if (!teleportToggle) bot.core.run(`tptoggle ${bot.options.username} disable`);
|
else if (!teleportToggle) bot.core.run(`tptoggle ${bot.options.username} disable`);
|
||||||
|
|
Loading…
Reference in a new issue