Coded
This commit is contained in:
parent
475a790b51
commit
b99eb62498
16
config.js
16
config.js
@ -72,6 +72,13 @@ function gen_kb(bot, p_en, parr,lang){
|
||||
let bck = "";
|
||||
let kb = [];
|
||||
let ntmr = tmr;
|
||||
for(let k of Object.keys(ntmr)){
|
||||
if(p_en.indexOf(k.toString()) == -1){
|
||||
ntmr[k]=false;
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
for(let pp of parr){
|
||||
try{
|
||||
if(ntmr[pp].sub){
|
||||
@ -88,16 +95,13 @@ function gen_kb(bot, p_en, parr,lang){
|
||||
}
|
||||
if(ntmr){
|
||||
for(let k of Object.keys(ntmr)){
|
||||
if(p_en.indexOf(k.toString()) == -1){
|
||||
continue;
|
||||
}
|
||||
let ctmr = ntmr[k];
|
||||
if(ctmr.sub){
|
||||
let str = ctmr.desc[lang];
|
||||
kb.push(bot.mkcb(str,cbt.sel,k));
|
||||
}else if(ctmr.tmr){
|
||||
let str = ctmr.desc[lang];
|
||||
let c = arr.join("_") + "_" + k.toString();
|
||||
let c = parr.join("_") + "_" + k.toString();
|
||||
|
||||
kb.push(bot.mkcb(str,cbt.sel,c));
|
||||
}
|
||||
@ -115,6 +119,10 @@ function gen_kb(bot, p_en, parr,lang){
|
||||
return kb;
|
||||
}
|
||||
|
||||
// let bot ={
|
||||
// mkcb:(x,y,z)=>{return y+"_"+z}
|
||||
// }
|
||||
// console.log(gen_kb(bot,["atrium"],["atrium"],0))
|
||||
|
||||
module.exports = function(arr){
|
||||
this.arr = arr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user