aichaos / rivescript-go

A RiveScript interpreter for Go. RiveScript is a scripting language for chatterbots.
https://www.rivescript.com/
MIT License
60 stars 16 forks source link

Ignore case in triggers? #43

Closed rmasci closed 1 year ago

rmasci commented 4 years ago

ALl triggers are lower cased -- is it possible to create a trigger that doesn't? I have a user of my chatbot that he wants to decrypt a string. So that string is in upper / lower case etc.

+ decrypt string *
- LocalCommand /usr/local/bin/decrypt <star1>

I have code in my chatbot that looks at the response. If the response starts with: LocalCommand, RemoteCommand it tries to execute the command, the results of that command is what gets sent to the user. This is configurable and can check if that user is allowed to run that command etc. Anyway is there a way to ignore the case of what is input in \<star1>? Something like this:

+ decrypt string <ignorecase>*
- LocalCommand /usr/local/bin/decrypt <star1>

I am asking first. I plan on creating one for my chatbot....