Open ghost opened 7 years ago
Yeah this isn't supported.
The random tags are found by a regexp like {random}(.+?){/random}
, so if you had embedded random tags, the closing tag of the inner random would match with the opening tag of the outer random.
{random}{random}Yes?|Yea?{/random}|Yea?{/random}
The first iteration of the regexp would match {random}{random}Yes?|Yea?{/random}
with the inner text being {random}Yes?|Yea?
which it would then pick a random result from (one of which contains another random tag which might go on to confuse the bot even further).
Hi. If I try to insert random tag inside random tag:
+ <bot name>
* <get it> == undefined => {random}
^ {random}Yes?|Yea?{/random}|
^ Yea?{/random}
- What's up?
I'm getting this output:Yea?|Yea?{/random}
I'm using default response in begin block:* <bot mood> == happy => {ok}
If I use that code in begin block:* <bot mood> == happy => {random}
^ {ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|{ok}|
^ {ok} :)|{ok} :)|
^ {ok} ;)|{ok} ;)|
^ {ok} :P|
^ {ok} ;P{/random}
The response is even more strange:Yea?|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random}|Yea?|Yea?{/random} :)|Yea?|Yea?{/random} :)|Yea?|Yea?{/random} ;)|Yea?|Yea?{/random} ;)|Yea?|Yea?{/random} :P|Yea?|Yea?{/random} ;P{/random}