mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 23:57:57 -05:00
f
This commit is contained in:
parent
d6aa5bdedd
commit
d74480e1d5
2 changed files with 6 additions and 2 deletions
6
index.js
6
index.js
|
@ -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) {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue