This commit is contained in:
ChomeNS 2022-08-19 10:07:12 +07:00
parent d6aa5bdedd
commit d74480e1d5
2 changed files with 6 additions and 2 deletions

View file

@ -156,7 +156,11 @@ function main() {
try { try {
if (bot.queue[0]) { if (bot.queue[0]) {
try { try {
if (containsIllegalCharacters(bot.queue[0])) return; console.log(bot.queue[0]);
if (containsIllegalCharacters(bot.queue[0])) {
bot.queue.shift();
return;
};
bot.write('chat', {message: bot.queue[0].substring(0, 256)}); bot.write('chat', {message: bot.queue[0].substring(0, 256)});
bot.queue.shift(); bot.queue.shift();
} catch (e) { } catch (e) {

View file

@ -15,7 +15,7 @@ function inject(bot) {
run(command) { run(command) {
try { try {
if (config.useChat && command.startsWith('minecraft:tellraw @a ') && !command.includes('Console') && !command.includes('Discord')) { if (config.useChat && command.startsWith('minecraft:tellraw @a ') && !command.includes('Console') && !command.includes('Discord')) {
bot.chat(chatMessage.fromNotch(command.replace('minecraft:tellraw @a ', '')).toMotd().replaceAll('§', '&')); bot.chat(chatMessage.fromNotch(command.replace('minecraft:tellraw @a ', '')).toMotd().replaceAll('\xa7', '&'));
return; return;
} }