Compare commits

...

2 Commits

Author SHA1 Message Date
e3fef4f097 fixed reconnecting crashes 2020-06-28 13:03:51 +02:00
85ca175099 updated dependencies 2020-06-27 13:00:36 +02:00
4 changed files with 15 additions and 15 deletions

View File

@ -21,7 +21,7 @@ A fork of the popular proxy to wait out 2b2t.org's way too long queue. [2lazy2wa
# How to use
1. Read the code to ensure i'm not stealing your credentials. i'm not, but you shouldn't take my word for it. If you don't know how to read it, downloading stuff off the internet and giving it your password is probably a bad idea anyway.
2. Run 'npm start'
2. Run `npm start`
3. Your bot should be online now, in discord it should show up with "Queue stopped."
4. See below for commands on how to start the queue.
5. You can access the original 2bored2wait web interface from http://localhost
@ -30,11 +30,11 @@ A fork of the popular proxy to wait out 2b2t.org's way too long queue. [2lazy2wa
# Commands
All commands can be used through discord or the cli.
- 'start' will start the queue. It takes between 15-30 seconds for the bot to update with the queue position.
- 'start 14:00' will start at 2pm.
- 'play 8:00' will try to calculate the right time to join so you can at 8:00
- 'update' will send an update to the current channel with your position and ETA.
- 'stop' will stop the queue.
- `start` will start the queue. It takes between 15-30 seconds for the bot to update with the queue position.
- `start 14:00` will start at 2pm.
- `play 8:00` will try to calculate the right time to join so you can at 8:00
- `update` will send an update to the current channel with your position and ETA.
- `stop` will stop the queue.
# Forewarning
Do not give your secrets.json file to anyone under any circumstances.

View File

@ -14,11 +14,11 @@
"notConnectedQueueEnd": true // restart the queue if you are not connect at the end of it
},
"minecraftserver": { // the server you want to connect. Make not much sense to change it, was just added for development purpose
"hostname": "2b2t.org",
"hostname": "localhost",
"port": 25565,
"renderDistance": 8,
"version": "1.12.2",
"onlinemode": true, // chunk caching does not work correctly if set to false
"onlinemode": false, // chunk caching does not work correctly if set to false
"username": "lol" // the username to use if onlinemode is false
},
"notification": { // sends a message via discord if the place in the queue reaches the specified number

View File

@ -10,11 +10,11 @@
},
"license": "GPL-3.0-only",
"dependencies": {
"discord.js": "^11.5.1",
"luxon": "^1.22.2",
"minecraft-protocol": "^1.11.0",
"minecraft-server-util": "^1.1.0",
"moment": "^2.24.0",
"discord.js": "^11.6.4",
"luxon": "^1.24.1",
"minecraft-protocol": "^1.13.0",
"minecraft-server-util": "^1.3.0",
"moment": "^2.27.0",
"opn": "^6.0.0",
"prismarine-tokens": "^1.0.3",
"prompt": "^1.0.0"

View File

@ -119,7 +119,6 @@ function join() {
let headermessage = JSON.parse(data.header);
let positioninqueue = headermessage.text.split("\n")[5].substring(25);
webserver.queuePlace = positioninqueue; // update info on the web page
console.log(positioninqueue);
if (webserver.queuePlace !== "None" && lastQueuePlace !== webserver.queuePlace) {
if (!totalWaitTime) {
totalWaitTime = Math.pow(positioninqueue / 35.4, 2 / 3);
@ -392,6 +391,7 @@ function userInput(cmd, DiscordOrigin, discordMsg) {
sendDiscordMsg(discordMsg.channel, "Timer", "Queue is starting at " + starttimestring);
} else console.log("Queue is starting at " + starttimestring);
} else if (/^play (\d|[0-1]\d|2[0-3]):[0-5]\d$/.test(cmd)) {
timeStringtoDateTime(cmd);
calcTime(cmd);
let output = "The perfect time to start the will be calculated, so you play at " + starttimestring;
if (DiscordOrigin) sendDiscordMsg(discordMsg.channel, "time calculator", output);