PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.92k stars 904 forks source link

bot detection error #3022

Closed Cat123bat closed 1 year ago

Cat123bat commented 1 year ago

please help my bot can't connect to minecraft server when i run it this error pops up in the code: PS D:\bots> node mybot.js Debugger attached. Waiting for the debugger to disconnect... D:\bots\mybot.js:1 const bot = mineflayer.createBot({ ^

ReferenceError: mineflayer is not defined at Object. (D:\bots\mybot.js:1:13) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47

Node.js v18.16.0

chatgpt says my code is correct

my code: const bot = mineflayer.createBot({ host: "botsimp.aternos.me", username: "mybot", version: "1.12.2" });

amoraschi commented 1 year ago

Please ask ChatGPT to link you some JS basics tutorials. To provide support we need the user to have some basic understanding of the language.

Same goes for the duplicate discussion you opened (#3021)