Compare commits
2 Commits
a24699cf87
...
e3fef4f097
| Author | SHA1 | Date | |
|---|---|---|---|
| e3fef4f097 | |||
| 85ca175099 |
12
README.md
12
README.md
@ -21,7 +21,7 @@ A fork of the popular proxy to wait out 2b2t.org's way too long queue. [2lazy2wa
|
|||||||
|
|
||||||
# How to use
|
# 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.
|
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."
|
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.
|
4. See below for commands on how to start the queue.
|
||||||
5. You can access the original 2bored2wait web interface from http://localhost
|
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
|
# Commands
|
||||||
All commands can be used through discord or the cli.
|
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` 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.
|
- `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
|
- `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.
|
- `update` will send an update to the current channel with your position and ETA.
|
||||||
- 'stop' will stop the queue.
|
- `stop` will stop the queue.
|
||||||
|
|
||||||
# Forewarning
|
# Forewarning
|
||||||
Do not give your secrets.json file to anyone under any circumstances.
|
Do not give your secrets.json file to anyone under any circumstances.
|
||||||
|
|||||||
@ -14,11 +14,11 @@
|
|||||||
"notConnectedQueueEnd": true // restart the queue if you are not connect at the end of it
|
"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
|
"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,
|
"port": 25565,
|
||||||
"renderDistance": 8,
|
"renderDistance": 8,
|
||||||
"version": "1.12.2",
|
"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
|
"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
|
"notification": { // sends a message via discord if the place in the queue reaches the specified number
|
||||||
|
|||||||
10
package.json
10
package.json
@ -10,11 +10,11 @@
|
|||||||
},
|
},
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^11.5.1",
|
"discord.js": "^11.6.4",
|
||||||
"luxon": "^1.22.2",
|
"luxon": "^1.24.1",
|
||||||
"minecraft-protocol": "^1.11.0",
|
"minecraft-protocol": "^1.13.0",
|
||||||
"minecraft-server-util": "^1.1.0",
|
"minecraft-server-util": "^1.3.0",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.27.0",
|
||||||
"opn": "^6.0.0",
|
"opn": "^6.0.0",
|
||||||
"prismarine-tokens": "^1.0.3",
|
"prismarine-tokens": "^1.0.3",
|
||||||
"prompt": "^1.0.0"
|
"prompt": "^1.0.0"
|
||||||
|
|||||||
@ -119,7 +119,6 @@ function join() {
|
|||||||
let headermessage = JSON.parse(data.header);
|
let headermessage = JSON.parse(data.header);
|
||||||
let positioninqueue = headermessage.text.split("\n")[5].substring(25);
|
let positioninqueue = headermessage.text.split("\n")[5].substring(25);
|
||||||
webserver.queuePlace = positioninqueue; // update info on the web page
|
webserver.queuePlace = positioninqueue; // update info on the web page
|
||||||
console.log(positioninqueue);
|
|
||||||
if (webserver.queuePlace !== "None" && lastQueuePlace !== webserver.queuePlace) {
|
if (webserver.queuePlace !== "None" && lastQueuePlace !== webserver.queuePlace) {
|
||||||
if (!totalWaitTime) {
|
if (!totalWaitTime) {
|
||||||
totalWaitTime = Math.pow(positioninqueue / 35.4, 2 / 3);
|
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);
|
sendDiscordMsg(discordMsg.channel, "Timer", "Queue is starting at " + starttimestring);
|
||||||
} else console.log("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)) {
|
} else if (/^play (\d|[0-1]\d|2[0-3]):[0-5]\d$/.test(cmd)) {
|
||||||
|
timeStringtoDateTime(cmd);
|
||||||
calcTime(cmd);
|
calcTime(cmd);
|
||||||
let output = "The perfect time to start the will be calculated, so you play at " + starttimestring;
|
let output = "The perfect time to start the will be calculated, so you play at " + starttimestring;
|
||||||
if (DiscordOrigin) sendDiscordMsg(discordMsg.channel, "time calculator", output);
|
if (DiscordOrigin) sendDiscordMsg(discordMsg.channel, "time calculator", output);
|
||||||
@ -475,4 +475,4 @@ module.exports = {
|
|||||||
stop: function () {
|
stop: function () {
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user