this commit was supposed to be adding disguise command and disguise will be
the first proxy command but i failed..
This commit is contained in:
ChomeNS 2022-12-12 18:37:29 +07:00
parent a155a50100
commit 227e4833d4
7 changed files with 29 additions and 27 deletions

View file

@ -47,10 +47,10 @@ module.exports = {
alias: [],
description: 'Loop commands',
usage: [
'<hash> <add> <interval> <command>',
'<hash> <remove> <index>',
'<hash> <removeall|clear>',
'<hash> <list>'
'<hash> add <interval> <command>',
'<hash> remove <index>',
'<hash> removeall|clear',
'<hash> list'
],
trusted: 1,
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {

View file

@ -6,8 +6,8 @@ module.exports = {
alias: [],
description: 'Moo',
usage: [
'<cow> <message>',
'<list (not support on Discord)>'
'cow <message>',
'list (not support on Discord)'
],
trusted: 0,
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {

View file

@ -10,9 +10,9 @@ module.exports = {
description: 'Safe eval 100% secure!!!',
trusted: 0,
usage: [
'<run> <code>',
'<reset>',
'<server (eval server)> <code>'
'run <code>',
'reset',
'server (eval server) <code>'
],
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
if (args[0] === 'run') {

View file

@ -80,15 +80,15 @@ module.exports = {
}
};
for (const command of bot.command_handler.commands) {
if (command.trusted !== 0) continue
if (command.trusted !== 0 || command.proxy) continue
generalCommands.push(component(command, 'green'))
}
for (const command of bot.command_handler.commands) {
if (command.trusted !== 1) continue
if (command.trusted !== 1 || command.proxy) continue
trustedCommands.push(component(command, 'red'))
}
for (const command of bot.command_handler.commands) {
if (command.trusted !== 2) continue
if (command.trusted !== 2 || command.proxy) continue
ownerCommands.push(component(command, 'dark_red'))
}
@ -128,7 +128,7 @@ module.exports = {
supportedCommands += command.name + ' '
}
for (const command of bot.command_handler.commands) {
if (command.discordExecute) continue
if (command.discordExecute || command.proxy) continue
unsupportedCommands += command.name + ' '
}
const Embed = new MessageEmbed()

View file

@ -151,14 +151,14 @@ module.exports = {
alias: [],
trusted: 0,
usage: [
'<play> <song>',
'<playurl> <url>',
'<stop>',
'<loop> <all|current|off>',
'<list> [directory]',
'<skip>',
'<nowplaying>',
'<queue>'
'play <song>',
'playurl <url>',
'stop',
'loop <all|current|off>',
'list [directory]',
'skip',
'nowplaying',
'queue'
],
execute (bot, username, usernameraw, sender, prefix, args, config, hash, ownerhash, selector) {
switch (args[0]) {

View file

@ -16,7 +16,9 @@ function inject (bot, client, target, config, clientPacketBlacklist) {
'h', // real hash hardcode
'o',
client.username,
true
true,
client,
target
)
}

View file

@ -42,24 +42,24 @@ function parsePlayerMessages (message, packet, bot) {
if (raw.match(/.* .*: .*/g)) {
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/:.*/g, '').replace(/§#....../gm, '')
const message = raw.split(': ').slice(1).join(' ').replace(/§#....../gm, '')
bot.emit('message', username, message, packet.sender)
bot.emit('chat', username, message, packet.sender)
} else if (raw.match(/.* .*\u203a .*/g)) {
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u203a.*/g, '').replace(/§#....../gm, '').split(' ')[0]
const message = raw.split('\u203a ').slice(1).join(' ').substring(2)
bot.emit('message', username, message, packet.sender)
bot.emit('chat', username, message, packet.sender)
} else if (raw.match(/.* .*\u00BB .*/g)) {
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0]
const message = raw.split('\u00BB ').slice(1).join(' ').substring(2)
bot.emit('message', username, message, packet.sender)
bot.emit('chat', username, message, packet.sender)
} else if (raw.match(/.* .*> .*/g)) {
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/>.*/g, '').replace(/§#....../gm, '').split(' ')[0]
const message = raw.split('> ').slice(1).join(' ').substring(2)
bot.emit('message', username, message, packet.sender)
bot.emit('chat', username, message, packet.sender)
} else if (raw.match(/<.*> .*/g)) {
const username = raw.substring(1).split('>')[0]
const message = raw.split('> ').slice(1).join(' ')
bot.emit('message', username, message, packet.sender)
bot.emit('chat', username, message, packet.sender)
} else if (raw.match(/§.*§b: §b\/.*/g)) {
const username = raw.split('§b: §b')[0]
const command = raw.split('§b: §b')[1]