$param for keywords

I’d like use $param variable in keywords.

I guess it possible like param = message.replace(keyword.keyword, ''), or regexp, whatever.

where keyword.keyword it’s db row.

Also will be good if it will be shared to custom variables registry.

Not sure if I understand how you would get that param in keyword as keyword is triggered by phrase like
keyword: test

Hey, it’s test, friend < what would be param?

Will be as param.

Ok, it can be called as message instead of param.

So Hey, it's test, friend will have param as only first part? It does seems little bit complicated. Also if you have several keywords in one message (or several same keywords), how that would behave?

Hm, you are right. This is complicated and have no point.

I am not saying it have no point. Just trying to figure out usage of such feature and consistent behavior.

Well, my point was:

I has an keyword, which value is botname, and when someone ping bot in chat with example message @botname hello, then i send api request to some talking api, and it simple return hi, based on user message.

it has point if keyword in start of message, i think, or on the end of message.

This topic was automatically closed after 3 days. New replies are no longer allowed.