из js в python mineflayer
у меня есть кусок кода javasript и у меня на питоне скачана библеотека javascript
from javascript import require, On, once
кусок кода js
const mineflayer = require('mineflayer')
const mineflayerViewer = require('prismarine-viewer').mineflayer
const bot = mineflayer.createBot({
username: 'Bot'
})
bot.once('spawn', () => {
mineflayerViewer(bot, { port: 3000 }) // Start the viewing server on port 3000
// Draw the path followed by the bot
const path = [bot.entity.position.clone()]
bot.on('move', () => {
if (path[path.length - 1].distanceTo(bot.entity.position) > 1) {
path.push(bot.entity.position.clone())
bot.viewer.drawLine('path', path)
}
})
})
и мне нужно чтоб строку
bot.once('spawn', () => {
mineflayerViewer(bot, { port: 3000 })
перевели в питон спомощью библеотеки javascript