blooket.js
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -7,5 +7,8 @@ /** | ||
const WebSocket = require('ws'); | ||
const Sockets = require("./socketDetector") | ||
function socketcheck(pin) { | ||
return new Promise((resolve, reject) => { | ||
var socket = new WebSocket("wss://s-usc1c-nss-250.firebaseio.com/.ws?v=5&ns=blooket-2020") | ||
return new Promise(async(resolve, reject) => { | ||
var sockets = await Sockets().catch((e) => {}) | ||
console.log(sockets) | ||
var socket = new WebSocket(sockets[0]) | ||
socket.on('open', function() { | ||
@@ -25,3 +28,3 @@ socket.send('{"t":"d","d":{"r":2,"a":"q","b":{"p":"/' + pin + '","h":""}}}') | ||
var first = setTimeout(function() { | ||
socket = new WebSocket("wss://s-usc1c-nss-242.firebaseio.com/.ws?v=5&ns=blooket-2021") | ||
socket = new WebSocket(sockets[1]) | ||
socket.on("open", function() { | ||
@@ -41,3 +44,3 @@ socket.send('{"t":"d","d":{"r":2,"a":"q","b":{"p":"/' + pin + '","h":""}}}') | ||
var seconds = setTimeout(function () { | ||
var socket = new WebSocket("wss://s-usc1c-nss-201.firebaseio.com/.ws?v=5&ns=blooket-2023") | ||
var socket = new WebSocket(sockets[2]) | ||
socket.on("open", function() { | ||
@@ -57,3 +60,3 @@ socket.send('{"t":"d","d":{"r":2,"a":"q","b":{"p":"/' + pin + '","h":""}}}') | ||
var third = setTimeout(function () { | ||
var socket = new WebSocket("wss://s-usc1c-nss-206.firebaseio.com/.ws?v=5&ns=blooket-2022") | ||
var socket = new WebSocket(sockets[3]) | ||
socket.on("open", function() { | ||
@@ -60,0 +63,0 @@ socket.send('{"t":"d","d":{"r":2,"a":"q","b":{"p":"/' + pin + '","h":""}}}') |
{ | ||
"name": "blooket.js", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "This is a terminal client for the quiz service known as Blooket", | ||
@@ -5,0 +5,0 @@ "main": "blooket.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27821
11
503