everything_else

It will be executed as long as none of the declared blocks in the current context have been executed. In other words, If the match doesn't occurs.

everything_else(&block)

This method is used to handle and eventually send a reply to a message that the chatbot couldn't understand.

Platforms

PlatformSupported

Messenger

WhatsApp

Telegram

Usage

class MainContext < Conversation

  def actions
  
    intent "greeting" do 
      @reply.text "Hello!"
    end
    
    intent "thanks" do 
      @reply.text "You're welcome"
    end
    
    intent "bye" do
      @text.text "Good bye!"
    end
    
    everything_else do    
      @reply.text "I don't understand what you say"    
    end
    
  end
  
end

Last updated