We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Received raw json in title property and cannot call something line .toAnsi()
.toAnsi()
The text was updated successfully, but these errors were encountered:
Current workaround:
let ChatMessage; function getWindowTitle(window) { let title; try { title = JSON.parse(window.title); } catch { title = window.title; } return new ChatMessage(title); } const bot = mineflayer.createBot({ host: host, port: port, username: username, }); bot.once('spawn', async () => { ChatMessage = require('prismarine-chat')(bot.version); }); bot.on('windowOpen', (window) => { const title = getWindowTitle(window); const msg = `Opened window ${title.toAnsi()} (${window.id}|${window.type})`; });
Sorry, something went wrong.
No branches or pull requests
Received raw json in title property and cannot call something line
.toAnsi()
The text was updated successfully, but these errors were encountered: