SlnDmry commited on
Commit
50f2df2
·
verified ·
1 Parent(s): 2c99b26

Update bot.js

Browse files
Files changed (1) hide show
  1. bot.js +5 -1
bot.js CHANGED
@@ -6,6 +6,7 @@ const Movements = require("mineflayer-pathfinder").Movements;
6
  const pathfinder = require("mineflayer-pathfinder").pathfinder;
7
  const { GoalBlock, GoalXZ } = require("mineflayer-pathfinder").goals;
8
  const util = require("util");
 
9
 
10
  const config = require("./settings.json");
11
  const loggers = require("./logging.js");
@@ -46,12 +47,15 @@ let viewerTimeout = null;
46
  let bot = null;
47
 
48
  function createBot() {
 
 
49
  bot = mineflayer.createBot({
50
  username: config["bot-account"]["username"],
51
  auth: config["bot-account"]["type"],
52
  host: config.server.ip,
53
  port: config.server.port,
54
- version: config.server.version
 
55
  });
56
 
57
 
 
6
  const pathfinder = require("mineflayer-pathfinder").pathfinder;
7
  const { GoalBlock, GoalXZ } = require("mineflayer-pathfinder").goals;
8
  const util = require("util");
9
+ const { SocksProxyAgent } = require("socks-proxy-agent");
10
 
11
  const config = require("./settings.json");
12
  const loggers = require("./logging.js");
 
47
  let bot = null;
48
 
49
  function createBot() {
50
+
51
+ const agent = new SocksProxyAgent("socks5://206.123.156.222:8291");
52
  bot = mineflayer.createBot({
53
  username: config["bot-account"]["username"],
54
  auth: config["bot-account"]["type"],
55
  host: config.server.ip,
56
  port: config.server.port,
57
+ version: config.server.version,
58
+ agent
59
  });
60
 
61