Closed kars0nn closed 4 years ago
Can you show us your code?
Can you show us your code?
Mind to share the tablist screenshot?
Mind to share the tablist screenshot?
are you sure, you're using the newest version of mineflayer? This seems like an old bug that has already been fixed.
are you sure, you're using the newest version of mineflayer? This seems like an old bug that has already been fixed.
how can I check / update?
we discussed this but nobody fixed it could you open a PR adding a try-catch at https://github.com/PrismarineJS/mineflayer/blob/master/lib/plugins/tablist.js#L18?
we discussed this but nobody fixed it could you open a PR adding a try-catch at https://github.com/PrismarineJS/mineflayer/blob/master/lib/plugins/tablist.js#L18?
how would I do that? Could you help me with that?
we discussed this but nobody fixed it could you open a PR adding a try-catch at https://github.com/PrismarineJS/mineflayer/blob/master/lib/plugins/tablist.js#L18?
escapeValueNewlines
is supposed to take care of it. Adding try/catch is not a solution.
The correct solution is to change match.replace('\n', '\\n')
to match.replace(/\n/g, '\\n')
The correct solution is to change
match.replace('\n', '\\n')
tomatch.replace(/\n/g, '\\n')
It worked!!!! Thank you so much, you guys are the best!
Ah right I remember now. Can you please pr it ?
On Tue, Jul 21, 2020, 23:05 karson-d notifications@github.com wrote:
The correct solution is to change match.replace('\n', '\n') to match.replace(/\n/g, '\n')
It worked!!!! Thank you so much, you guys are the best!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/mineflayer/issues/1169#issuecomment-662106029, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437WMAQKFLD3TXP6CODLR4X7KBANCNFSM4PDHH2EA .
Versions
Issue : I havent been writing js for very long, so any help would be amazing. I started coding the bot, everything i have so far works great. The bot connects to minecraft, it sends embedded minecraft chat messages to discord, but this only happens for about 2 seconds before the console logs an error.
Here is the console log:
I would expect for it to consistantly stay online in both minecraft and discord. I would also expect for it to keep sending chat messages to discord (which it has been doing for the 3 seconds it's online)
Any help is appreciated!