superscriptjs / superscript

A dialogue engine for creating chat bots
http://superscriptjs.com
MIT License
1.65k stars 209 forks source link

Cannot read property 'stars' of undefined #350

Open davidroman0O opened 7 years ago

davidroman0O commented 7 years ago

Hi!

I'm having an issue when trying to call a command. I have to type it twice to make it work!

Expected Behavior

User - search vehicule
* redirect to topic vehicule *
Bot - You're now in the vehicule section. 

Current Behavior

User - search vehicule
(in console : There was an error processing reply tags: TypeError: Cannot read property 'stars' of undefined)
Bot - 
User - search vehicule
Bot - You're now in the vehicule section. 

Steps to Reproduce (for bugs)

> topic main {keep}

    + search (vehicule|customer)
    - ^topicRedirect(<cap1>, "__sayVehicule__")

< topic

> topic vehicule

    + __sayVehicule__
    - You're now in the vehicule section.

    + lock
    - Ok, i've lock it up 

    + open
    - Ok, it's open now

    + return
    - OK! Back Operation Mode {topic=new_topic} {clear}
    ^ You're now redirect to Operation Mode

< topic

Context

So it's a bit frustrating, i really don't know if i'm doing it well. Tell me if something wrong with my simple script, maybe it's an error in superscript side...

Your Environment

NodeJS : v7.4.0 SuperScript : ^1.0.0

That's it! Thx for this project that's could be very cool when stable :)