mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -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 {
|
||||
if (bot.queue[0]) {
|
||||
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.queue.shift();
|
||||
} catch (e) {
|
||||
|
|
|
@ -15,7 +15,7 @@ function inject(bot) {
|
|||
run(command) {
|
||||
try {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue