keyword
This block will be executed if the message is one of the defined keywords.
Platform | Supported |
---|---|
Messenger | |
WhatsApp | |
Telegram |
class MainContext < Conversation
def blocks
keyword ["stop","close","quit"] do
@reply.text "I'll stop responding you until you write the keyword 'start'"
end
keyword "start" do
@rsp.text("Great!")
@reply.text "Let's chat again! 😃"
end
end
end
Last modified 7mo ago