Mineflayer bot for Python, logging out of the server using a third-party file

303 Views Asked by At

I am writing a mineflayer bot via Python:

mineflayer = require('mineflayer')

bot_minecraft = mineflayer.createBot({
            'host': host,
            'username': username,
            'version': False

    })

@On(bot_minecraft, 'login')
    def logined(*args):
        print("spawn")

I have a file where the input() command is executed by the while loop:

while True:
    input()

I need my bot to exit the server by entering the quit command here. What can be done?

0

There are 0 best solutions below