xeno bugfix
This commit is contained in:
parent
1431cd3d1b
commit
6f9e2e5b72
31
client.js
31
client.js
|
@ -16,7 +16,7 @@ const mineflayer = require("mineflayer");
|
|||
const mc_bridge_enabled = false;
|
||||
const irc_bridge_enabled = true;
|
||||
const instance = "https://4get.lumaeris.com";
|
||||
var scraper = "ddg";
|
||||
var scraper = "google_cse";
|
||||
|
||||
const mc_options = {
|
||||
"host": "deek.chat",
|
||||
|
@ -647,6 +647,7 @@ init_irc();
|
|||
async function fetch_xeno(recording, index, msg){
|
||||
|
||||
index--;
|
||||
console.log(recording[index]);
|
||||
|
||||
var filereq = await fetch(
|
||||
recording[index].file,
|
||||
|
@ -1448,9 +1449,31 @@ deek.on("message", async function(msg, user){
|
|||
|
||||
global_page = 1;
|
||||
is_pp_xeno = true;
|
||||
results_cache = res_get.recordings;
|
||||
|
||||
await fetch_xeno(res_get.recordings, 1, msg);
|
||||
// filter out restricted results
|
||||
results_cache = [];
|
||||
|
||||
for(var k=0; k<res_get.recordings.length; k++){
|
||||
|
||||
if(
|
||||
typeof res_get.recordings[k].file == "string" &&
|
||||
res_get.recordings[k].file != ""
|
||||
){
|
||||
|
||||
results_cache.push(res_get.recordings[k]);
|
||||
}
|
||||
}
|
||||
|
||||
if(results_cache.length === 0){
|
||||
|
||||
send(
|
||||
msg,
|
||||
"This species has been raped to death by filthy h*mans and is not available for listening"
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
await fetch_xeno(results_cache, 1, msg);
|
||||
break;
|
||||
|
||||
case "fortune":
|
||||
|
@ -1667,7 +1690,7 @@ deek.on("message", async function(msg, user){
|
|||
)
|
||||
.resize(
|
||||
{
|
||||
width: 350,
|
||||
width: 450,
|
||||
fit: "inside"
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue