urFate / Afk-Bot

Funcional minecraft AFK bot for servers. Anti-AFK, Auto-Auth, Microsoft/Offline accounts support.
MIT License
111 stars 443 forks source link

Cant start! #69

Closed JonJon565 closed 1 year ago

JonJon565 commented 1 year ago

I go to start in and it gives this error `Error: Cannot find module '/home/runner/Afk-Bot-1/index.js' Require stack:

`

my settings.json is and i have via version and via backwards and via rewind instaled

`{ "bot-account": { "username": "bot", "password": "", "type": "" },

"server": { "ip": "(i have this set correctly)", "port": 55928, "version": "1.19.3" },

"position": { "enabled": false, "x": 0, "y": 0, "z": 0 },

"utils": { "auto-auth": { "enabled": true, "password": "12345678" },

"anti-afk": {
  "enabled": true,
  "sneak": false,
  "jump": true,
  "rotate": true,

  "hit": {
    "enabled": false,
    "delay": 1000,
    "attack-mobs": false
  },

  "circle-walk": {
    "enabled": false,
    "radius": 2
  }
},

"chat-messages": {
  "enabled": false,
  "repeat": true,
  "repeat-delay": 60,

  "messages": [
    "I'm a regular player ",
    "My owner is urFate_ ",
    "I want be alone ",
    "Visit my GitHub page! (urFate/Afk-Bot)"
  ]
},

"chat-log": true,
"auto-reconnect": false,
"auto-reconnect-delay": 5000

} } `

urFate commented 1 year ago

The main file is called bot.js and not index.js

JonJon565 commented 1 year ago

oh ok thx.

JonJon565 commented 1 year ago

also you should add a website so people can use uptimerobot

in the index.js all you have to do is add this

'use strict';

const http = require('http'); const port = process.env.PORT || 8000; const server = http.createServer(function(req, res) { res.setHeader('Content-Type', 'text/plain'); res.end('Hello world'); });

server.listen(port, function() { console.log('Listening on port', port); })

JonJon565 commented 1 year ago

another bug 👎

Hint: hit control+c anytime to enter REPL.
Listening on port 8000
[2023-03-13T04:05:40.662] [INFO] default - Bot joined to the server
/home/runner/Afk-Bot/node_modules/prismarine-chat/index.js:390
      const fstr = format.formatString
                          ^

TypeError: Cannot read properties of undefined (reading 'formatString')
    at ChatMessage.fromNetwork (/home/runner/Afk-Bot/node_modules/prismarine-chat/index.js:390:27)
    at Client.<anonymous> (/home/runner/Afk-Bot/node_modules/mineflayer/lib/plugins/chat.js:121:25)
    at Client.emit (node:events:513:28)
    at Client.emit (node:domain:489:12)
    at Client.<anonymous> (/home/runner/Afk-Bot/node_modules/minecraft-protocol/src/client/chat.js:197:14)
    at Client.emit (node:events:513:28)
    at Client.emit (node:domain:489:12)
    at FullPacketParser.<anonymous> (/home/runner/Afk-Bot/node_modules/minecraft-protocol/src/client.js:91:12)
    at FullPacketParser.emit (node:events:513:28)

Node.js v18.12.1
repl process died unexpectedly: exit status 1
 
(To exit
JonJon565 commented 1 year ago

when my friend who is on bedrock comments it does that also i have geysermc installed

urFate commented 1 year ago

another bug -1

Hint: hit control+c anytime to enter REPL.
Listening on port 8000
[2023-03-13T04:05:40.662] [INFO] default - Bot joined to the server
/home/runner/Afk-Bot/node_modules/prismarine-chat/index.js:390
      const fstr = format.formatString
                          ^

TypeError: Cannot read properties of undefined (reading 'formatString')
    at ChatMessage.fromNetwork (/home/runner/Afk-Bot/node_modules/prismarine-chat/index.js:390:27)
    at Client.<anonymous> (/home/runner/Afk-Bot/node_modules/mineflayer/lib/plugins/chat.js:121:25)
    at Client.emit (node:events:513:28)
    at Client.emit (node:domain:489:12)
    at Client.<anonymous> (/home/runner/Afk-Bot/node_modules/minecraft-protocol/src/client/chat.js:197:14)
    at Client.emit (node:events:513:28)
    at Client.emit (node:domain:489:12)
    at FullPacketParser.<anonymous> (/home/runner/Afk-Bot/node_modules/minecraft-protocol/src/client.js:91:12)
    at FullPacketParser.emit (node:events:513:28)

Node.js v18.12.1
repl process died unexpectedly: exit status 1
 
(To exit

This is prismarine-chat issue, so it's not bug of this project. You can open new issue there.

JonJon565 commented 1 year ago

ok seems prismarine-chat fixed this issue