[fix] greater not working
This commit is contained in:
@@ -256,7 +256,7 @@ function wppParser(data:string){
|
|||||||
// Extract key and value within brackets
|
// Extract key and value within brackets
|
||||||
let keyBracketStartIndex = line.indexOf('(');
|
let keyBracketStartIndex = line.indexOf('(');
|
||||||
let keyBracketEndIndex = line.indexOf(')');
|
let keyBracketEndIndex = line.indexOf(')');
|
||||||
|
|
||||||
if(keyBracketStartIndex === -1 || keyBracketEndIndex === -1)
|
if(keyBracketStartIndex === -1 || keyBracketEndIndex === -1)
|
||||||
throw new Error(`Invalid syntax ${line}`);
|
throw new Error(`Invalid syntax ${line}`);
|
||||||
|
|
||||||
@@ -449,16 +449,16 @@ const matcher = (p1:string,matcherArg:matcherArg) => {
|
|||||||
return (arra[1] !== arra[2]) ? '1' : '0'
|
return (arra[1] !== arra[2]) ? '1' : '0'
|
||||||
}
|
}
|
||||||
case 'greater':{
|
case 'greater':{
|
||||||
return (arra[1] > arra[2]) ? '1' : '0'
|
return (Number(arra[1]) > Number(arra[2])) ? '1' : '0'
|
||||||
}
|
}
|
||||||
case 'less':{
|
case 'less':{
|
||||||
return (arra[1] < arra[2]) ? '1' : '0'
|
return (Number(arra[1]) < Number(arra[2])) ? '1' : '0'
|
||||||
}
|
}
|
||||||
case 'greater_equal':{
|
case 'greater_equal':{
|
||||||
return (arra[1] >= arra[2]) ? '1' : '0'
|
return (Number(arra[1]) >= Number(arra[2])) ? '1' : '0'
|
||||||
}
|
}
|
||||||
case 'less_equal':{
|
case 'less_equal':{
|
||||||
return (arra[1] <= arra[2]) ? '1' : '0'
|
return (Number(arra[1]) <= Number(arra[2])) ? '1' : '0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -407,6 +407,7 @@ export interface groupChat{
|
|||||||
backgroundHTML?:string,
|
backgroundHTML?:string,
|
||||||
reloadKeys?:number
|
reloadKeys?:number
|
||||||
backgroundCSS?:string
|
backgroundCSS?:string
|
||||||
|
oneAtTime?:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface botPreset{
|
export interface botPreset{
|
||||||
|
|||||||
Reference in New Issue
Block a user